[2.13.2] fix bug of triangle has no marker
This commit is contained in:
@@ -36,16 +36,14 @@ object V2XAiRoadEventMarker {
|
||||
fun drawMarkers(entity: V2XRoadEventEntity): Pair<IMogoPolyline?, List<IMogoMarker>?>? {
|
||||
removeMarkers(current.get())
|
||||
timerTask.get()?.cancel()
|
||||
val extra = entity.noveltyInfo.extras.get("polygon");
|
||||
val extra = entity.noveltyInfo.extras["polygon"]
|
||||
if (extra is List<*>) {
|
||||
val l = extra
|
||||
if (l.size > 0) {
|
||||
if (extra.size > 0) {
|
||||
val polygons: MutableList<androidx.core.util.Pair<Double, Double>> = ArrayList()
|
||||
for (i in l.indices) {
|
||||
val o = l[i]!! as? androidx.core.util.Pair<*, *> ?: continue
|
||||
val p = o
|
||||
val first = p.first
|
||||
val second = p.second
|
||||
for (i in extra.indices) {
|
||||
val o = extra[i]!! as? androidx.core.util.Pair<*, *> ?: continue
|
||||
val first = o.first
|
||||
val second = o.second
|
||||
if (first == null || second == null) {
|
||||
continue
|
||||
}
|
||||
@@ -63,7 +61,7 @@ object V2XAiRoadEventMarker {
|
||||
options.anchor(0.5f, 0.5f)
|
||||
options.icon3DRes(raw.sanjiaozhui)
|
||||
try {
|
||||
val marker = MogoMarkerManager.getInstance(context()).addMarker("road_pyramid_" + entity.getPoiType(), options)
|
||||
val marker = MogoMarkerManager.getInstance(context()).addMarker("road_pyramid_" + entity.poiType, options)
|
||||
markers += marker
|
||||
} catch (t: Throwable) {
|
||||
t.printStackTrace()
|
||||
@@ -87,7 +85,7 @@ object V2XAiRoadEventMarker {
|
||||
if (points.size > 2) {
|
||||
points.add(points[0])
|
||||
}
|
||||
options.points(points);
|
||||
options.points(points)
|
||||
options.useGradient(true)
|
||||
options.useFacade(true)
|
||||
options.setGps(false)
|
||||
|
||||
Reference in New Issue
Block a user