[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,6 +1,8 @@
package com.mogo.eagle.core.data.enums
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_PONDING.poiType -> R.raw.v2x_daolujishui
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_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
else -> 0
}

View File

@@ -1,6 +1,8 @@
package com.mogo.eagle.core.data.enums
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
}
}
@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
}
}
}
}
}