[6.2.6][Feat]新增Taxi所需模型

This commit is contained in:
chenfufeng
2023-12-21 15:36:00 +08:00
parent 119c50579a
commit 9ec8de199e
14 changed files with 94 additions and 7 deletions

View File

@@ -1,10 +1,12 @@
package com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.road package com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.road
import android.graphics.Color import android.graphics.Color
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.enums.EventTypeEnumNew import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.data.map.MogoLatLng import com.mogo.eagle.core.data.map.MogoLatLng
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.function.biz.v2x.v2n.consts.V2XConst import com.mogo.eagle.function.biz.v2x.v2n.consts.V2XConst
import com.mogo.eagle.function.biz.v2x.v2n.remove.MarkerWrapper import com.mogo.eagle.function.biz.v2x.v2n.remove.MarkerWrapper
import com.mogo.map.overlay.core.* import com.mogo.map.overlay.core.*
@@ -23,6 +25,8 @@ class V2XAiRoadEventMarker {
.Builder(V2XConst.V2X_MARKER_OWNER, Level.MAP_MARKER) .Builder(V2XConst.V2X_MARKER_OWNER, Level.MAP_MARKER)
.longitude(entity.location.lon) .longitude(entity.location.lon)
.latitude(entity.location.lat) .latitude(entity.location.lat)
.scale(if (EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGU.poiType == entity.poiType && AppIdentityModeUtils.isTaxi(
FunctionBuildConfig.appIdentityMode)) 0.6f else 1.0f)
.icon3DRes(EventTypeEnumNew.getMarker3DRes(entity.poiType)) .icon3DRes(EventTypeEnumNew.getMarker3DRes(entity.poiType))
.set3DMode(true) .set3DMode(true)
.build())?.also { wrapper.addPoint(it) } .build())?.also { wrapper.addPoint(it) }

View File

@@ -4,11 +4,14 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X
import static com.mogo.map.MogoMap.DEFAULT; import static com.mogo.map.MogoMap.DEFAULT;
import androidx.core.util.Pair; import androidx.core.util.Pair;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.data.enums.EventTypeEnumNew; import com.mogo.eagle.core.data.enums.EventTypeEnumNew;
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay; import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
import com.mogo.eagle.core.data.map.entity.MarkerLocation; import com.mogo.eagle.core.data.map.entity.MarkerLocation;
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity; import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager; import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.function.biz.v2x.V2XBizTrace; import com.mogo.eagle.function.biz.v2x.V2XBizTrace;
import com.mogo.eagle.function.biz.v2x.v2n.consts.V2XConst; import com.mogo.eagle.function.biz.v2x.v2n.consts.V2XConst;
@@ -55,6 +58,8 @@ public class V2XRoadEventMarker implements IV2XMarker<V2XRoadEventEntity> {
.longitude(entity.getLocation().getLon()) .longitude(entity.getLocation().getLon())
.latitude(entity.getLocation().getLat()) .latitude(entity.getLocation().getLat())
.set3DMode(true) .set3DMode(true)
.scale(EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGU.getPoiType().equals(entity.getPoiType()) && AppIdentityModeUtils.isTaxi(
FunctionBuildConfig.appIdentityMode) ? 0.6f : 1.0f)
.icon3DRes(EventTypeEnumNew.getMarker3DRes(entity.getPoiType())).build(),DEFAULT); .icon3DRes(EventTypeEnumNew.getMarker3DRes(entity.getPoiType())).build(),DEFAULT);
if (point != null) { if (point != null) {
V2XBizTrace.Companion.onAck("V2XRoadEventMarker -> --- add Marker type: ", entity.getPoiType(), false); V2XBizTrace.Companion.onAck("V2XRoadEventMarker -> --- add Marker type: ", entity.getPoiType(), false);

View File

@@ -172,7 +172,7 @@ object TrafficMarkerDrawer {
TAG, TAG,
"drawObuRecognizedDataMarker trafficData.type = " + trafficData.type + "---trafficData.threatLevel = " + trafficData.threatLevel "drawObuRecognizedDataMarker trafficData.type = " + trafficData.type + "---trafficData.threatLevel = " + trafficData.threatLevel
) )
val resId: Int = trafficData.type.traffic3DIconId val resId: Int = TrafficTypeEnum.getMarker3DRes(trafficData.type.type)
val resIdVal = resId.toString() + "" val resIdVal = resId.toString() + ""
val builder = Point.Options.Builder(DataTypes.TYPE_MARKER_ADAS, MAP_MARKER) val builder = Point.Options.Builder(DataTypes.TYPE_MARKER_ADAS, MAP_MARKER)
.anchor(0.5f, 0.5f) .anchor(0.5f, 0.5f)

View File

@@ -1,6 +1,8 @@
package com.mogo.eagle.core.data.enums package com.mogo.eagle.core.data.enums
import com.mogo.eagle.core.data.R import com.mogo.eagle.core.data.R
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
/** /**
@@ -735,9 +737,15 @@ enum class EventTypeEnumNew(
FOURS_ICE.poiType -> R.raw.v2x_daolujiebing FOURS_ICE.poiType -> R.raw.v2x_daolujiebing
FOURS_PONDING.poiType -> R.raw.v2x_daolujishui FOURS_PONDING.poiType -> R.raw.v2x_daolujishui
GHOST_PROBE.poiType -> R.raw.v2x_guzhangqiuzhu GHOST_PROBE.poiType -> R.raw.v2x_guzhangqiuzhu
TYPE_SOCKET_ROAD_SHIGONG.poiType -> R.raw.v2x_shigong_warning TYPE_SOCKET_ROAD_SHIGONG.poiType -> R.raw.v2x_shigong_warning// 施工气泡
TYPE_SOCKET_ROAD_JINGZHI.poiType -> R.raw.v2x_zhangai TYPE_SOCKET_ROAD_JINGZHI.poiType -> R.raw.v2x_zhangai
TYPE_SOCKET_ROAD_SHIGU.poiType -> R.raw.v2x_shigu_sanjiaopai TYPE_SOCKET_ROAD_SHIGU.poiType -> {
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
R.raw.v2x_shigu_sanjiaopai
} else {
R.raw.taxi_sanjiaopai
}
}
TYPE_SOCKET_ROAD_CONGESTION.poiType -> R.raw.v2x_yongdu TYPE_SOCKET_ROAD_CONGESTION.poiType -> R.raw.v2x_yongdu
else -> 0 else -> 0
} }

View File

@@ -1,6 +1,8 @@
package com.mogo.eagle.core.data.enums package com.mogo.eagle.core.data.enums
import com.mogo.eagle.core.data.R import com.mogo.eagle.core.data.R
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
/** /**
@@ -118,6 +120,74 @@ enum class TrafficTypeEnum(
else -> TYPE_TRAFFIC_ID_WEI_ZHI else -> TYPE_TRAFFIC_ID_WEI_ZHI
} }
} }
@JvmStatic
fun getMarker3DRes(type: Int): Int {
// Taxi和Bus使用不同的模型
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
return when (type) {
TYPE_TRAFFIC_ID_WEI_ZHI.type -> R.raw.traffic_xiankuang
TYPE_TRAFFIC_ID_PEOPLE.type -> R.raw.taxi_traffic_people
TYPE_TRAFFIC_ID_BICYCLE.type -> R.raw.taxi_traffic_zixingche
TYPE_TRAFFIC_ID_TA_CHE.type -> R.raw.taxi_traffic_tachexiaoche
TYPE_TRAFFIC_ID_MOTO.type -> R.raw.taxi_traffic_motuoche
TYPE_TRAFFIC_ID_BUS.type -> R.raw.taxi_traffic_daba
TYPE_TRAFFIC_ID_TRUCK.type -> R.raw.taxi_traffic_daba
TYPE_TRAFFIC_ID_CAMERA.type -> R.raw.shexiangtou
TYPE_TRAFFIC_ID_SPECIAL_VEHICLE.type -> R.raw.special_vehicle
TYPE_TRAFFIC_ID_DAO_LU_SHI_GONG.type -> R.raw.v2x_shigong_warning
else -> R.raw.traffic_xiankuang
}
} else {
return when (type) {
TYPE_TRAFFIC_ID_WEI_ZHI.type -> R.raw.traffic_xiankuang
TYPE_TRAFFIC_ID_PEOPLE.type -> R.raw.xingren
TYPE_TRAFFIC_ID_BICYCLE.type -> R.raw.traffic_zixingche_day
TYPE_TRAFFIC_ID_TA_CHE.type -> R.raw.traffic_tachexiaoche_day
TYPE_TRAFFIC_ID_MOTO.type -> R.raw.traffic_motuoche_day
TYPE_TRAFFIC_ID_BUS.type -> R.raw.traffic_daba_day
TYPE_TRAFFIC_ID_TRUCK.type -> R.raw.traffic_daba_day
TYPE_TRAFFIC_ID_CAMERA.type -> R.raw.shexiangtou
TYPE_TRAFFIC_ID_SPECIAL_VEHICLE.type -> R.raw.special_vehicle
TYPE_TRAFFIC_ID_DAO_LU_SHI_GONG.type -> R.raw.v2x_shigong_warning
else -> R.raw.traffic_xiankuang
}
}
}
@JvmStatic
fun getMarkerNight3DRes(type: Int): Int {
// Taxi和Bus使用不同的模型
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
return when (type) {
TYPE_TRAFFIC_ID_WEI_ZHI.type -> R.raw.traffic_xiankuang
TYPE_TRAFFIC_ID_PEOPLE.type -> R.raw.taxi_traffic_people
TYPE_TRAFFIC_ID_BICYCLE.type -> R.raw.taxi_traffic_zixingche
TYPE_TRAFFIC_ID_TA_CHE.type -> R.raw.taxi_traffic_tachexiaoche
TYPE_TRAFFIC_ID_MOTO.type -> R.raw.taxi_traffic_motuoche
TYPE_TRAFFIC_ID_BUS.type -> R.raw.taxi_traffic_daba
TYPE_TRAFFIC_ID_TRUCK.type -> R.raw.taxi_traffic_daba
TYPE_TRAFFIC_ID_CAMERA.type -> R.raw.shexiangtou
TYPE_TRAFFIC_ID_SPECIAL_VEHICLE.type -> R.raw.special_vehicle
TYPE_TRAFFIC_ID_DAO_LU_SHI_GONG.type -> R.raw.v2x_shigong_warning
else -> R.raw.traffic_xiankuang
}
} else {
return when (type) {
TYPE_TRAFFIC_ID_WEI_ZHI.type -> R.raw.traffic_xiankuang
TYPE_TRAFFIC_ID_PEOPLE.type -> R.raw.xingren_night
TYPE_TRAFFIC_ID_BICYCLE.type -> R.raw.traffic_zixingche
TYPE_TRAFFIC_ID_TA_CHE.type -> R.raw.traffic_tachexiaoche
TYPE_TRAFFIC_ID_MOTO.type -> R.raw.traffic_motuoche
TYPE_TRAFFIC_ID_BUS.type -> R.raw.traffic_daba
TYPE_TRAFFIC_ID_TRUCK.type -> R.raw.traffic_daba
TYPE_TRAFFIC_ID_CAMERA.type -> R.raw.shexiangtou
TYPE_TRAFFIC_ID_SPECIAL_VEHICLE.type -> R.raw.special_vehicle
TYPE_TRAFFIC_ID_DAO_LU_SHI_GONG.type -> R.raw.v2x_shigong_warning
else -> R.raw.traffic_xiankuang
}
}
}
} }
} }

View File

@@ -5,10 +5,10 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig;
public class HostConst { public class HostConst {
public static final String HOST_DEV = "https://eagle-qa.zhidaozhixing.com"; public static final String HOST_DEV = "https://eagle-qa.zhidaozhixing.com";
public static final String HOST_RELEASE = "http://eagle-mis.zhidaozhixing.com"; public static final String HOST_RELEASE = "https://eagle-mis.zhidaozhixing.com";
public static final String HOST_EAGLE_QA = "https://eagle-dns-qa.zhidaozhixing.com/"; public static final String HOST_EAGLE_QA = "https://eagle-dns-qa.zhidaozhixing.com/";
public static final String HOST_EAGLE_RELEASE = "http://eagle-dns.zhidaozhixing.com/"; public static final String HOST_EAGLE_RELEASE = "https://eagle-dns.zhidaozhixing.com/";
public static String getHost() { public static String getHost() {
String host = HOST_RELEASE; String host = HOST_RELEASE;

View File

@@ -753,9 +753,9 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
private fun addPreVehicleModelWeiZhi(typeTrafficId: TrafficTypeEnum, logMsg: String) { private fun addPreVehicleModelWeiZhi(typeTrafficId: TrafficTypeEnum, logMsg: String) {
// 根据当前的地图皮肤模式动态替换 // 根据当前的地图皮肤模式动态替换
val preVehicleStrWeiZhi: String? = if (isDayMode) { val preVehicleStrWeiZhi: String? = if (isDayMode) {
map.addPreVehicleModel(typeTrafficId.type, typeTrafficId.traffic3DIconId) map.addPreVehicleModel(typeTrafficId.type, TrafficTypeEnum.getMarker3DRes(typeTrafficId.type))
} else { } else {
map.addPreVehicleModel(typeTrafficId.type, typeTrafficId.traffic3DNightIconId) map.addPreVehicleModel(typeTrafficId.type, TrafficTypeEnum.getMarkerNight3DRes(typeTrafficId.type))
} }
d(M_MAP + TAG, logMsg + preVehicleStrWeiZhi) d(M_MAP + TAG, logMsg + preVehicleStrWeiZhi)
if (preVehicleStrWeiZhi == null) { if (preVehicleStrWeiZhi == null) {