diff --git a/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/mapdirectionview/MapDirectionView.kt b/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/mapdirectionview/MapDirectionView.kt index 2f05db6d1e..9f809d75e1 100644 --- a/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/mapdirectionview/MapDirectionView.kt +++ b/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/mapdirectionview/MapDirectionView.kt @@ -310,11 +310,15 @@ class MapDirectionView @JvmOverloads constructor( override fun setLineMarker() {} fun clearCoordinatesLatLng() { - textureList.clear() - texIndexList.clear() - routeArrived.clear() - routeArriving.clear() - mLineStationLatLng.clear() + try { + textureList.clear() + texIndexList.clear() + routeArrived.clear() + routeArriving.clear() + mLineStationLatLng.clear() + }catch (e:Exception){ + e.printStackTrace() + } d(SceneConstant.M_BUS_P + TAG, " mCoordinatesLatLng.clear ") } @@ -339,14 +343,18 @@ class MapDirectionView @JvmOverloads constructor( routeArriving: List, location: MogoLocation? ) { - this.routeArrived.clear() - this.routeArrived.addAll(routeArrived) - this.routeArriving.clear() - this.routeArriving.addAll(routeArriving) - this.location = location - UiThreadHandler.post({ - drawablePolyline() - }, UiThreadHandler.MODE.QUEUE) + try { + this.routeArrived.clear() + this.routeArrived.addAll(routeArrived) + this.routeArriving.clear() + this.routeArriving.addAll(routeArriving) + this.location = location + UiThreadHandler.post({ + drawablePolyline() + }, UiThreadHandler.MODE.QUEUE) + }catch (e:Exception){ + e.printStackTrace() + } } fun clearLineMarkers() {