From 2a4908582f339f4e7b7678f91fb62260eeb0c9e3 Mon Sep 17 00:00:00 2001 From: renwj Date: Wed, 30 Oct 2024 21:15:33 +0800 Subject: [PATCH] =?UTF-8?q?[6.7.0][=E5=9C=B0=E5=9B=BEsdk]=20=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E5=9C=B0=E5=9B=BEsdk=E5=B4=A9=E6=BA=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../main/java/com/mogo/map/AMapViewWrapper.kt | 29 ---------- .../main/java/com/mogo/map/MogoAutoView.kt | 55 +++++++++++++++++-- 3 files changed, 52 insertions(+), 34 deletions(-) diff --git a/gradle.properties b/gradle.properties index dfb14a8e00..f8fad816b6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -83,7 +83,7 @@ MOGO_TELEMATIC_VERSION=1.4.7.42 MOGO_SKIN_VERSION=1.4.7.49.18-debug ######## MogoAiCloudSDK Version ######## # 自研地图 -MAP_SDK_VERSION=3.4.1.21 +MAP_SDK_VERSION=3.4.1.22 MAP_SDK_DATA_VERSION=1.0.0.9 MAP_SDK_OPERATION_VERSION=1.1.4.1 # websocket 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 1294d9a89e..701c059f50 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 @@ -199,35 +199,6 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle override fun onMapLoaded() { i(M_MAP + TAG, "onMapLoaded: ") if (checkAMapView()) { - val hdVisibleArray = arrayListOf( - HDTypes.DIVIDER.type, - HDTypes.ROAD_AREA.type, - HDTypes.STOP_LINE.type, - HDTypes.ARROW.type, - HDTypes.STATION_BRIDGE.type, - HDTypes.ZEBRA_LINE.type, - HDTypes.GREEN_BELT.type, - HDTypes.DIVERSION.type, - HDTypes.SAFE_ISLAND.type, - HDTypes.ALPHANUMERIC.type, - HDTypes.GUARDBAR.type, - HDTypes.TRAFFIC_DEVICE.type, - HDTypes.building.type, - HDTypes.streetLight.type, - HDTypes.area.type, - HDTypes.regional.type, - HDTypes.geometricLinear.type, - HDTypes.geometricSurface.type, - 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() } } diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/MogoAutoView.kt b/libraries/mogo-map/src/main/java/com/mogo/map/MogoAutoView.kt index 16e7f17d19..8448427500 100644 --- a/libraries/mogo-map/src/main/java/com/mogo/map/MogoAutoView.kt +++ b/libraries/mogo-map/src/main/java/com/mogo/map/MogoAutoView.kt @@ -2,15 +2,18 @@ package com.mogo.map import android.content.Context import android.util.AttributeSet +import android.util.Log +import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.config.HdMapBuildConfig import com.mogo.eagle.core.data.enums.Carmodel.T2 import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager -import com.mogo.eagle.core.utilcode.mogo.logger.Logger +import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.zhidaoauto.map.sdk.inner.abs.IMapController import com.zhidaoauto.map.sdk.inner.abs.IMarkerController import com.zhidaoauto.map.sdk.open.abs.view.IMapStyleParams import com.zhidaoauto.map.sdk.open.renders.marker.Marker import com.zhidaoauto.map.sdk.open.renders.marker.MarkerOptions +import com.zhidaoauto.map.sdk.open.view.HDTypes import com.zhidaoauto.map.sdk.open.view.MapAutoView class MoGoAutoView: MapAutoView { @@ -24,6 +27,44 @@ class MoGoAutoView: MapAutoView { constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) + init { + Log.d(TAG, "--- MoGoAutoView --- init --") + val hdVisibleArray = arrayListOf( + HDTypes.DIVIDER.type, + HDTypes.ROAD_AREA.type, + HDTypes.STOP_LINE.type, + HDTypes.ARROW.type, + HDTypes.STATION_BRIDGE.type, + HDTypes.ZEBRA_LINE.type, + HDTypes.GREEN_BELT.type, + HDTypes.DIVERSION.type, + HDTypes.SAFE_ISLAND.type, + HDTypes.ALPHANUMERIC.type, + HDTypes.GUARDBAR.type, + HDTypes.TRAFFIC_DEVICE.type, + HDTypes.building.type, + HDTypes.streetLight.type, + HDTypes.area.type, + HDTypes.regional.type, + HDTypes.geometricLinear.type, + HDTypes.geometricSurface.type, + HDTypes.poi.type + ) + if (AppIdentityModeUtils.isTaxiPassenger( + FunctionBuildConfig.appIdentityMode + ) + ) { + hdVisibleArray.add(HDTypes.CABLE.type) + hdVisibleArray.add(HDTypes.SIGNAL_LINE.type) + } + getMapStyleParams()?.also { + Log.d(TAG, "--- MoGoAutoView --- init 1 --") + it.setHDVisibileArray(hdVisibleArray.toIntArray()) + } + } + + + override fun getMarkerController(mapController: IMapController): IMarkerController { return MarkerControllerWrapper(super.getMarkerController(mapController)) } @@ -31,8 +72,9 @@ class MoGoAutoView: MapAutoView { private class MarkerControllerWrapper(private val controller: IMarkerController): IMarkerController by controller { override fun addSelfCar(markerOptions: MarkerOptions): Marker? { - Logger.d(TAG, "addSelfCar-> ${HdMapBuildConfig.currentCarVrIconRes}") + Log.d(TAG, "addSelfCar-> ${HdMapBuildConfig.currentCarVrIconRes}") if (HdMapBuildConfig.currentCarVrIconRes == T2.rawValue) { + Log.d(TAG, "addSelfCar-> T2 --") markerOptions.scale = 1.05f } return controller.addSelfCar(markerOptions) @@ -41,13 +83,18 @@ class MoGoAutoView: MapAutoView { override fun onAttachedToWindow() { super.onAttachedToWindow() - Logger.d(TAG, "-- onAttachedToWindow --") + Log.d(TAG, "-- onAttachedToWindow --") CallerMapUIServiceManager.getOverlayManager()?.clear() } override fun onDetachedFromWindow() { super.onDetachedFromWindow() - Logger.d(TAG, "-- onDetachedFromWindow --") + Log.d(TAG, "-- onDetachedFromWindow --") CallerMapUIServiceManager.getOverlayManager()?.clear() } + + override fun onDestroy() { + super.onDestroy() + Log.d(TAG, "--- onDestroy() ---") + } } \ No newline at end of file