From 1e644976246e47b4c4cb878caccea21a9b4243a1 Mon Sep 17 00:00:00 2001 From: chenfufeng Date: Tue, 26 Dec 2023 19:18:48 +0800 Subject: [PATCH] =?UTF-8?q?[6.2.6][Opt]Taxi=E4=B9=98=E5=AE=A2=E5=B1=8F?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=85=89=E7=BC=86=E3=80=81=E4=BF=A1=E5=8F=B7?= =?UTF-8?q?=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/mogo/map/AMapViewWrapper.kt | 39 ++++++++++++++----- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.kt b/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.kt index 54f99a6dcc..0da5592f5b 100644 --- a/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.kt +++ b/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.kt @@ -10,6 +10,7 @@ import android.text.TextUtils import android.view.MotionEvent import android.view.View import com.autonavi.nge.map.OnMapScreenShotListener +import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.deva.chain.ChainConstant import com.mogo.eagle.core.data.enums.TrafficTypeEnum import com.mogo.eagle.core.data.map.MogoLatLng @@ -22,6 +23,7 @@ import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager.invoke import com.mogo.eagle.core.function.call.map.CallerMapRomaListener.invokeMapRomaRange import com.mogo.eagle.core.function.call.map.CallerMapRomaListener.invokeMapRomaStatus import com.mogo.eagle.core.function.call.map.CallerMapScreenListenerManager +import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.e import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.i @@ -64,7 +66,7 @@ import kotlin.properties.Delegates class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIController, OnMapLoadedListener, OnMapClickListener, OnMapTouchListener, OnMarkClickListener, OnMapStyleListener, OnMapViewVisualAngleChangeListener, OnRoadInfoListener, - ILog, OnRoamStatusListener, OnRoadSideFenceRegionListener,OnMapScreenShotListener { + ILog, OnRoamStatusListener, OnRoadSideFenceRegionListener, OnMapScreenShotListener { companion object { private const val TAG = "AMapViewWrapper" @@ -126,7 +128,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle mMapView.setOnRoamStatusListener(this) mMapView.setOnMapViewVisualAngleChangeListener(this) mMapView.setOnRoadInfoListener(this, 1) - mMapView.setOnRoadSideFenceRegionListener(this,5000) + mMapView.setOnRoadSideFenceRegionListener(this, 5000) mMapView.registerScreenListener(this) registerLogListener(this, mMapView.getEventController()) d(M_MAP + TAG, "initListeners - setOnMapStyleListener - view $mMapView") @@ -197,7 +199,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle override fun onMapLoaded() { i(M_MAP + TAG, "onMapLoaded: ") if (checkAMapView()) { - val hdVisibleArray = intArrayOf( + val hdVisibleArray = arrayListOf( HDTypes.DIVIDER.type, HDTypes.ROAD_AREA.type, HDTypes.STOP_LINE.type, @@ -216,8 +218,16 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle HDTypes.regional.type, HDTypes.geometricLinear.type, HDTypes.geometricSurface.type, - HDTypes.poi.type) - mMapView.getMapAutoViewHelper()!!.setHDTypeVisible(hdVisibleArray) + HDTypes.poi.type + ) + if (AppIdentityModeUtils.isTaxiPassenger( + FunctionBuildConfig.appIdentityMode + ) + ) { + hdVisibleArray.add(HDTypes.CABLE.type) + hdVisibleArray.add(HDTypes.SIGNAL_LINE.type) + } + mMapView.getMapAutoViewHelper()!!.setHDTypeVisible(hdVisibleArray.toIntArray()) loadPreVehicleModel() } } @@ -610,7 +620,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle if (count >= 3) { return@post } - handler.postDelayed({ changeCurrentIcon(iconId) },300L) + handler.postDelayed({ changeCurrentIcon(iconId) }, 300L) reChangeIconCount.set(0) } } @@ -656,15 +666,19 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle MapAutoApi.MAP_STYLE_DAY, MapAutoApi.MAP_STYLE_DAY_NAV -> { mCurrentUI = EnumMapUI.MAP_STYLE_DAY_NAV } + MapAutoApi.MAP_STYLE_NIGHT -> { mCurrentUI = EnumMapUI.MAP_STYLE_NIGHT } + MapAutoApi.MAP_STYLE_NIGHT_NAV -> { mCurrentUI = EnumMapUI.MAP_STYLE_NIGHT_NAV } + MapAutoApi.MAP_STYLE_NIGHT_VR -> { mCurrentUI = EnumMapUI.MAP_STYLE_NIGHT_VR } + MapAutoApi.MAP_STYLE_DAY_VR -> { mCurrentUI = EnumMapUI.MAP_STYLE_DAY_VR } @@ -753,9 +767,15 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle private fun addPreVehicleModelWeiZhi(typeTrafficId: TrafficTypeEnum, logMsg: String) { // 根据当前的地图皮肤模式动态替换 val preVehicleStrWeiZhi: String? = if (isDayMode) { - map.addPreVehicleModel(typeTrafficId.type, TrafficTypeEnum.getMarker3DRes(typeTrafficId.type)) + map.addPreVehicleModel( + typeTrafficId.type, + TrafficTypeEnum.getMarker3DRes(typeTrafficId.type) + ) } else { - map.addPreVehicleModel(typeTrafficId.type, TrafficTypeEnum.getMarkerNight3DRes(typeTrafficId.type)) + map.addPreVehicleModel( + typeTrafficId.type, + TrafficTypeEnum.getMarkerNight3DRes(typeTrafficId.type) + ) } d(M_MAP + TAG, logMsg + preVehicleStrWeiZhi) if (preVehicleStrWeiZhi == null) { @@ -893,7 +913,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle } override fun getMapScreenShot() { - if(checkAMapView()){ + if (checkAMapView()) { mMapView.getMapAutoViewHelper()?.toScreen() } } @@ -905,6 +925,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle } return MODE_MEDIUM_SIGHT } + /** * 高精地图屏幕截图 */