Merge branch 'dev_robotaxi-d_240912_6.7.0' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_robotaxi-d_240912_6.7.0

This commit is contained in:
aibingbing
2024-10-09 19:14:54 +08:00
44 changed files with 1323 additions and 315 deletions

View File

@@ -227,6 +227,7 @@ class TravelRealityView @JvmOverloads constructor(
@Volatile
private var isSmallMap: Boolean = true
private var iconRes = R.drawable.small_map_car
@Volatile
private var globalPathResp: MessagePad.GlobalPathResp? = null
private val mCoordinatesLatLng: MutableList<LatLng> = ArrayList()
private var mSmallCarMarker: Marker? = null
@@ -324,13 +325,22 @@ class TravelRealityView @JvmOverloads constructor(
}
// 显示小地图样式
changeMapSettings(true)
globalPathResp?.let {
if (it.wayPointsList.size > 0) {
drawRotting()
}
}
} else {
clearPolyline()
hideSmallCarMarker()
// 显示行程总览地图样式
changeMapSettings(false)
val globalPath = reqData
if (!globalPath.isNullOrEmpty()) {
requestData(globalPath as ArrayList<Point>)
}
if (!isRoadTrackReq) {
handleRoadTrajectories(roadTrackList, null)
handleRoadTrajectories(roadTrackList, globalPath)
}
}
}
@@ -559,10 +569,6 @@ class TravelRealityView @JvmOverloads constructor(
super.onVisibilityChanged(changedView, visibility)
if (visibility == VISIBLE) {
Log.d(TAG, "onVisibilityChanged:VISIBLE!")
val globalPath: List<Point>? = reqData
if (!globalPath.isNullOrEmpty()) {
requestData(globalPath as ArrayList<Point>)
}
}
}
@@ -585,6 +591,7 @@ class TravelRealityView @JvmOverloads constructor(
// 注册定位监听
CallerChassisLocationGCJ02ListenerManager.removeListener("${TAG}${this.hashCode()}")
CallerPlanningRottingListenerManager.removeListener("${TAG}${this.hashCode()}")
CallerAutoPilotStatusListenerManager.removeListener("${TAG}${this.hashCode()}")
nonFrequentHandler?.looper?.quitSafely()
nonFrequentHandler = null
travelNetWorkModel.cancelAllRequest()
@@ -1446,6 +1453,16 @@ class TravelRealityView @JvmOverloads constructor(
}
}
override fun onAutopilotRouteLineId(lineId: Long) {
super.onAutopilotRouteLineId(lineId)
if (lineId == 0L) {
this.globalPathResp = null
UiThreadHandler.post {
clearPolyline()
}
}
}
private fun drawRotting() {
globalPathResp?.let {
val latLngList: MutableList<MogoLatLng> = ArrayList()