[2.15.0][opt]兼容V2N新旧链路
This commit is contained in:
@@ -20,6 +20,7 @@ import com.amap.api.maps.CameraUpdate
|
||||
import com.amap.api.maps.CameraUpdateFactory
|
||||
import com.amap.api.maps.TextureMapView
|
||||
import com.amap.api.maps.model.*
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.map.Infrastructure
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.data.v2x.Center
|
||||
@@ -45,6 +46,7 @@ import com.mogo.eagle.core.function.smp.MarkerDrawerManager.planningPoints
|
||||
import com.mogo.eagle.core.function.smp.MarkerDrawerManager.startLoopCalCarLocation
|
||||
import com.mogo.eagle.core.function.smp.MarkerDrawerManager.updateRoutePoints
|
||||
import com.mogo.eagle.core.function.smp.V2XMarkerView
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.MapAssetStyleUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
@@ -319,7 +321,7 @@ class OverMapView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun onV2XEvents(v2XEventData: List<V2XEventData>?) {
|
||||
// showV2XEventMarkers(v2XEventData)
|
||||
showV2XEventMarkers(v2XEventData)
|
||||
}
|
||||
})
|
||||
CallerV2XListenerManager.addListener(TAG, this)
|
||||
@@ -719,34 +721,50 @@ class OverMapView @JvmOverloads constructor(
|
||||
val list = ArrayList<V2XEventData>()
|
||||
constructList?.forEach {
|
||||
it.eventPos?.offsetLL?.positionLatLon?.let { latLon ->
|
||||
list.add(V2XEventData(
|
||||
0, 0, "", Center(latLon.lat * 10.0.pow(-7.0),
|
||||
latLon.lon * 10.0.pow(-7.0)), null, 0.0, "10006", 1
|
||||
))
|
||||
list.add(
|
||||
V2XEventData(
|
||||
0, 0, "", Center(
|
||||
latLon.lat * 10.0.pow(-7.0),
|
||||
latLon.lon * 10.0.pow(-7.0)
|
||||
), null, 0.0, "10006", 1
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
triangleList?.forEach {
|
||||
it.eventPos?.offsetLL?.positionLatLon?.let { latLon ->
|
||||
list.add(V2XEventData(
|
||||
0, 0, "", Center(latLon.lat * 10.0.pow(-7.0),
|
||||
latLon.lon * 10.0.pow(-7.0)), null, 0.0, "10032", 1
|
||||
))
|
||||
list.add(
|
||||
V2XEventData(
|
||||
0, 0, "", Center(
|
||||
latLon.lat * 10.0.pow(-7.0),
|
||||
latLon.lon * 10.0.pow(-7.0)
|
||||
), null, 0.0, "10032", 1
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
congestionList?.forEach {
|
||||
it.eventPos?.offsetLL?.positionLatLon?.let { latLon ->
|
||||
list.add(V2XEventData(
|
||||
0, 0, "", Center(latLon.lat * 10.0.pow(-7.0),
|
||||
latLon.lon * 10.0.pow(-7.0)), null, 0.0, "10007", 1
|
||||
))
|
||||
list.add(
|
||||
V2XEventData(
|
||||
0, 0, "", Center(
|
||||
latLon.lat * 10.0.pow(-7.0),
|
||||
latLon.lon * 10.0.pow(-7.0)
|
||||
), null, 0.0, "10007", 1
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
parkingList?.forEach {
|
||||
it.pos?.offsetLL?.positionLatLon?.let { latLon ->
|
||||
list.add(V2XEventData(
|
||||
0, 0, "", Center(latLon.lat * 10.0.pow(-7.0),
|
||||
latLon.lon * 10.0.pow(-7.0)), null, 0.0, "10025", 1
|
||||
))
|
||||
list.add(
|
||||
V2XEventData(
|
||||
0, 0, "", Center(
|
||||
latLon.lat * 10.0.pow(-7.0),
|
||||
latLon.lon * 10.0.pow(-7.0)
|
||||
), null, 0.0, "10025", 1
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
UiThreadHandler.post {
|
||||
|
||||
Reference in New Issue
Block a user