diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapBizView.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapBizView.kt index eb3c275166..6cd150658b 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapBizView.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/MapBizView.kt @@ -11,6 +11,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Liste import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager +import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager import com.mogo.map.MogoMap import com.mogo.map.MogoMapView import com.mogo.map.overlay.line.Polyline @@ -137,6 +138,10 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context, // 先取消注册数据,再onDestroy CallerChassisLocationWGS84ListenerManager.removeListener(TAG) CallerChassisStatesListenerManager.removeListener(TAG) + CallerMapUIServiceManager.getOverlayManager()?.let { + it.removeAllLines() + it.removeAllPoints() + } super.onDestroy() }