[2.13.2] add interface of wgs84 to gaode
This commit is contained in:
@@ -8,6 +8,7 @@ import com.mogo.eagle.core.data.map.entity.MarkerLocation
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerUserInfo
|
||||
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.scene.airoad.AiRoadMarker
|
||||
import com.mogo.map.MogoMap
|
||||
import com.mogo.v2x.data.*
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import roadwork.Road
|
||||
@@ -83,12 +84,9 @@ fun Road.RW_PB.toRoadMarker(): V2XMarkerCardResult =
|
||||
l3.poiType = this.roadwork?.poiType?.toString()
|
||||
l3.generateTime = this.roadwork?.detectTime ?: 0L
|
||||
l3.location = V2XMarkerLocation().also { l4 ->
|
||||
val p = CoordinateUtils.transformWgsToGcj(
|
||||
this.roadwork?.center?.point?.lat ?: 0.0,
|
||||
this.roadwork?.center?.point?.lon ?: 0.0
|
||||
)
|
||||
l4.lon = p[0]
|
||||
l4.lat = p[1]
|
||||
val p = MogoMap.getInstance().mogoMap.switchLonLat(this.roadwork?.center?.point?.lon ?: 0.0,this.roadwork?.center?.point?.lat ?: 0.0)
|
||||
l4.lon = p.lon
|
||||
l4.lat = p.lat
|
||||
l4.angle = this.roadwork?.center?.road?.bearing?.toDouble() ?: 0.0
|
||||
}
|
||||
})
|
||||
@@ -119,9 +117,9 @@ fun MessagePad.TrackedObject.toRoadMarker(poiType: String): V2XMarkerCardResult
|
||||
l3.poiType = poiType
|
||||
l3.generateTime = 0L
|
||||
l3.location = V2XMarkerLocation().also { l4 ->
|
||||
val p = CoordinateUtils.transformWgsToGcj(this.latitude, this.longitude)
|
||||
l4.lon = p[0]
|
||||
l4.lat = p[1]
|
||||
val p = MogoMap.getInstance().mogoMap.switchLonLat(this.longitude,this.latitude)
|
||||
l4.lon = p.lon
|
||||
l4.lat = p.lat
|
||||
l4.angle = this.heading
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user