去掉同UUI的Marker修改模型
This commit is contained in:
@@ -95,8 +95,8 @@ object TrafficMarkerDrawer {
|
||||
|
||||
// 如果数据已经存在 Marker,取出做动画
|
||||
if (mMarkersCaches[it.key] != null) {
|
||||
mMarkersCaches[it.key]?.let { it1 ->
|
||||
changeDynamicMarker(it1, it.value)
|
||||
mMarkersCaches[it.key]?.let { marker ->
|
||||
changeDynamicMarker(marker, it.value)
|
||||
}
|
||||
}
|
||||
// 不存在的添加Marker绘制
|
||||
@@ -170,39 +170,31 @@ object TrafficMarkerDrawer {
|
||||
marker: IMogoMarker,
|
||||
trafficData: TrafficData
|
||||
) {
|
||||
val resId: Int = trafficData.type.traffic3DIconId
|
||||
val resIdVal = resId.toString() + ""
|
||||
val options = marker.mogoMarkerOptions
|
||||
if (options != null) {
|
||||
options.resName(mMarkerCachesResMd5Values[resIdVal])
|
||||
.icon3DRes(resId)
|
||||
|
||||
if (trafficData.type != TrafficTypeEnum.TYPE_TRAFFIC_ID_SPECIAL_VEHICLE) {
|
||||
// 修改颜色
|
||||
when (trafficData.threatLevel) {
|
||||
1 -> {
|
||||
mMarkersCaches[trafficData.uuid]?.setAnchorColor("#D8D8D8FF")
|
||||
}
|
||||
2 -> {
|
||||
mMarkersCaches[trafficData.uuid]?.setAnchorColor("#FFD53EFF")
|
||||
}
|
||||
3 -> {
|
||||
mMarkersCaches[trafficData.uuid]?.setAnchorColor("#FF3C45FF")
|
||||
}
|
||||
else -> {
|
||||
mMarkersCaches[trafficData.uuid]?.setAnchorColor("#D8D8D8FF")
|
||||
}
|
||||
if (trafficData.type != TrafficTypeEnum.TYPE_TRAFFIC_ID_SPECIAL_VEHICLE) {
|
||||
// 修改颜色
|
||||
when (trafficData.threatLevel) {
|
||||
1 -> {
|
||||
mMarkersCaches[trafficData.uuid]?.setAnchorColor("#D8D8D8FF")
|
||||
}
|
||||
2 -> {
|
||||
mMarkersCaches[trafficData.uuid]?.setAnchorColor("#FFD53EFF")
|
||||
}
|
||||
3 -> {
|
||||
mMarkersCaches[trafficData.uuid]?.setAnchorColor("#FF3C45FF")
|
||||
}
|
||||
else -> {
|
||||
mMarkersCaches[trafficData.uuid]?.setAnchorColor("#D8D8D8FF")
|
||||
}
|
||||
}
|
||||
|
||||
marker.addDynamicAnchorPosition(
|
||||
MogoLatLng(
|
||||
trafficData.lat,
|
||||
trafficData.lon
|
||||
),
|
||||
trafficData.heading.toFloat(),
|
||||
stepTime
|
||||
)
|
||||
}
|
||||
|
||||
marker.addDynamicAnchorPosition(
|
||||
MogoLatLng(
|
||||
trafficData.lat,
|
||||
trafficData.lon
|
||||
),
|
||||
trafficData.heading.toFloat(),
|
||||
stepTime
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user