From 607f31c9144db1d6a26fb798a0aa8a4ae6416d4f Mon Sep 17 00:00:00 2001 From: yangyakun Date: Thu, 28 Mar 2024 18:41:28 +0800 Subject: [PATCH] =?UTF-8?q?[6.3.0]=20[=E5=A4=9A=E7=BA=BF=E7=A8=8B=E9=97=AE?= =?UTF-8?q?=E9=A2=98]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapdirectionview/MapDirectionView.kt | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) 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() {