[6.8.0][Fix]解决行程全览起终点不清除的问题
This commit is contained in:
@@ -379,6 +379,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
} else {
|
||||
clearPolyline()
|
||||
clearSmallSites()
|
||||
hideSmallCarMarker()
|
||||
// 显示行程总览地图样式
|
||||
changeMapSettings(false)
|
||||
@@ -1596,6 +1597,15 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
private fun clearSmallSites() {
|
||||
UiThreadHandler.post {
|
||||
smallSiteMarkerList?.forEach {
|
||||
it.destroy()
|
||||
}
|
||||
smallSiteMarkerList = null
|
||||
}
|
||||
}
|
||||
|
||||
private fun hideStartEndMarker() {
|
||||
if (mSmallStartMarker != null) {
|
||||
mSmallStartMarker!!.isVisible = false
|
||||
@@ -1746,6 +1756,8 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
drawStartAndEnd(locList)
|
||||
}
|
||||
} else if (ochInfo.type == 1) {
|
||||
mSmallSiteList = null
|
||||
mSiteList.clear()
|
||||
val siteDataList = ochInfo.siteMarkerList
|
||||
val markerOptionsList: ArrayList<MarkerOptions> = ArrayList()
|
||||
siteDataList?.let { siteList ->
|
||||
@@ -1764,7 +1776,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
)
|
||||
)
|
||||
}
|
||||
mSmallSiteList = siteDataList
|
||||
mSmallSiteList = siteList
|
||||
}
|
||||
if (!isPlayingAnim) {
|
||||
drawSiteMarkers(markerOptionsList)
|
||||
@@ -1842,12 +1854,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
private fun drawSiteMarkers(markerOptionsList: ArrayList<MarkerOptions>) {
|
||||
if (isSmallMap) {
|
||||
if (markerOptionsList.isEmpty()) {
|
||||
UiThreadHandler.post {
|
||||
smallSiteMarkerList?.forEach {
|
||||
it.destroy()
|
||||
}
|
||||
smallSiteMarkerList = null
|
||||
}
|
||||
clearSmallSites()
|
||||
} else {
|
||||
UiThreadHandler.post {
|
||||
smallSiteMarkerList = mAMap?.addMarkers(markerOptionsList, false)
|
||||
@@ -2251,7 +2258,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun realDrawSiteMarkers(options: ArrayList<MarkerOptions>) {
|
||||
CallerLogger.d("$M_MAP$TAG", "realDrawSiteMarkers")
|
||||
CallerLogger.d("$M_MAP$TAG", "realDrawSiteMarkers,optEmpty:${options.isEmpty()}")
|
||||
siteMarkerList.forEach {
|
||||
it.destroy()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user