From 84ce3c2ac881fa31f222468226b17a664537402b Mon Sep 17 00:00:00 2001 From: EmArrow Date: Wed, 3 Jan 2024 21:15:09 +0800 Subject: [PATCH] [6.2.6]add func of far away taxi/bus/other model --- .../identify/TrackerSourceFilterHelper.kt | 7 ++++++ .../eagle/core/data/enums/TrafficTypeEnum.kt | 21 ++++++++++++++++++ gradle.properties | 4 ++-- libraries/mogo-map/build.gradle | 2 ++ .../main/java/com/mogo/map/AMapViewWrapper.kt | 12 ++++++++++ .../java/com/mogo/map/utils/ObjectUtils.java | 22 +++++++++++++++++-- 6 files changed, 64 insertions(+), 4 deletions(-) diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackerSourceFilterHelper.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackerSourceFilterHelper.kt index 20f4e056d8..13c4c0f747 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackerSourceFilterHelper.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackerSourceFilterHelper.kt @@ -4,6 +4,8 @@ import android.annotation.SuppressLint import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.enums.TrafficTypeEnum import com.mogo.eagle.core.function.call.biz.CallerFuncBizListenerManager +import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils.isPassenger +import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils.isTaxi import mogo.telematics.pad.MessagePad.* object TrackerSourceFilterHelper { @@ -41,6 +43,11 @@ object TrackerSourceFilterHelper { } fun getDefaultColor(data: TrackedObject): String { + if (isTaxi(FunctionBuildConfig.appIdentityMode) && + isPassenger(FunctionBuildConfig.appIdentityMode) + ) { + return "" + } var color = "" if (!FunctionBuildConfig.isDrawUnknownIdentifyData && data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI.type diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/TrafficTypeEnum.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/TrafficTypeEnum.kt index e0fd288f8d..a00bf8080a 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/TrafficTypeEnum.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/TrafficTypeEnum.kt @@ -101,6 +101,27 @@ enum class TrafficTypeEnum( R.raw.v2x_shigong_warning, R.raw.v2x_shigong_warning, R.raw.v2x_shigong_warning + ), + TYPE_TRAFFIC_ID_LUCE_TA_CHE( + 103, + "路侧他车", + R.raw.lucexiaoche, + R.raw.lucexiaoche, + R.raw.lucexiaoche + ), + TYPE_TRAFFIC_ID_LUCE_BUS( + 106, + "路侧大巴", + R.raw.lucedaba, + R.raw.lucedaba, + R.raw.lucedaba + ), + TYPE_TRAFFIC_ID_LUCE_TRUCK( + 108, + "路侧卡车", + R.raw.lucedaba, + R.raw.lucedaba, + R.raw.lucedaba ); companion object { diff --git a/gradle.properties b/gradle.properties index 8aeb7782c9..b66cf458cc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -61,7 +61,7 @@ bytex.ASM_API=ASM7 ################ 外部依赖引用 ################ # loglib -LOGLIB_VERSION=1.10.7 +LOGLIB_VERSION=1.10.8 ######## MogoAiCloudSDK Version ######## # 网络请求LOGLIB_VERSION MOGO_NETWORK_VERSION=1.4.7.23 @@ -81,7 +81,7 @@ MOGO_LOCATION_VERSION=1.4.7.23 MOGO_TELEMATIC_VERSION=1.4.7.23 ######## MogoAiCloudSDK Version ######## # 自研地图 -MAP_SDK_VERSION=3.3.3.7 +MAP_SDK_VERSION=3.3.3.12 MAP_SDK_DATA_VERSION=1.0.0.7 MAP_SDK_OPERATION_VERSION=1.1.4.1 # websocket diff --git a/libraries/mogo-map/build.gradle b/libraries/mogo-map/build.gradle index f7052af23d..1569e6c489 100644 --- a/libraries/mogo-map/build.gradle +++ b/libraries/mogo-map/build.gradle @@ -59,10 +59,12 @@ dependencies { if (Boolean.valueOf(USE_MAVEN_PACKAGE)) { + implementation rootProject.ext.dependencies.mogo_core_data implementation rootProject.ext.dependencies.mogomapapi implementation rootProject.ext.dependencies.mogocommons implementation rootProject.ext.dependencies.mogo_core_function_call } else { + implementation project(':core:mogo-core-data') implementation project(':libraries:mogo-map-api') implementation project(':foudations:mogo-commons') implementation project(':core:mogo-core-function-call') 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 0da5592f5b..5173b064ab 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 @@ -753,6 +753,18 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle ) addPreVehicleModelWeiZhi( TrafficTypeEnum.TYPE_TRAFFIC_ID_TRUCK, + "添加感知模型到地图中……preVehicleStrLuceTaChe=" + ) + addPreVehicleModelWeiZhi( + TrafficTypeEnum.TYPE_TRAFFIC_ID_LUCE_TA_CHE, + "添加感知模型到地图中……preVehicleStrTruck=" + ) + addPreVehicleModelWeiZhi( + TrafficTypeEnum.TYPE_TRAFFIC_ID_LUCE_BUS, + "添加感知模型到地图中……preVehicleStrLuceBus=" + ) + addPreVehicleModelWeiZhi( + TrafficTypeEnum.TYPE_TRAFFIC_ID_LUCE_TRUCK, "添加感知模型到地图中……preVehicleStrTruck=" ) } diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/utils/ObjectUtils.java b/libraries/mogo-map/src/main/java/com/mogo/map/utils/ObjectUtils.java index 328e7af299..f904b07f43 100644 --- a/libraries/mogo-map/src/main/java/com/mogo/map/utils/ObjectUtils.java +++ b/libraries/mogo-map/src/main/java/com/mogo/map/utils/ObjectUtils.java @@ -6,6 +6,7 @@ import android.text.TextUtils; import android.view.View; import com.mogo.eagle.core.data.map.MogoLatLng; +import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils; import com.mogo.map.overlay.line.Polyline; import com.mogo.map.overlay.point.Point; import com.mogo.map.uicontroller.MapCameraPosition; @@ -17,6 +18,7 @@ import com.zhidaoauto.map.sdk.open.marker.MarkerOptions; import com.zhidaoauto.map.sdk.open.marker.MarkerSimpleData; import com.zhidaoauto.map.sdk.open.poyline.PolylineOptions; import com.zhidaoauto.map.sdk.open.view.MapAutoView; +import com.mogo.eagle.core.data.config.FunctionBuildConfig; import java.util.ArrayList; import java.util.List; @@ -133,12 +135,28 @@ public class ObjectUtils { try { markerOptions = new MarkerSimpleData(); markerOptions.setId(aiData.getUuid().hashCode()); - markerOptions.setMarkerType(aiData.getType()); + markerOptions.setColor("#00FF00FF"); + int type = aiData.getType(); + if(AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && + AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)){ + if(type == 3){ + type = 103; + }else if(type == 6){ + type = 106; + }else if(type == 9){ + type = 108; + } + if (type != 103 && type != 106 && type != 108) { + markerOptions.setColor("#90ABCAFF"); + }else{ + markerOptions.setColor(""); + } + } + markerOptions.setMarkerType(type); markerOptions.setRotateAngle((float) aiData.getHeading()); markerOptions.setLat(aiData.getWgslat()); markerOptions.setLon(aiData.getWgslon()); markerOptions.setTime(Double.valueOf(aiData.getSatelliteTime()).longValue()); - markerOptions.setColor("#00FF00FF"); } catch (Exception e) { e.printStackTrace(); }