[3.4.0-map-sdk] loc wgs84 opt , get instead of callback , add func of traffic light cross road
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
package com.mogo.eagle.core.function.call.map
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP
|
||||
import com.zhidaoauto.map.data.road.RoadCross
|
||||
import com.zhidaoauto.map.data.road.StopLine
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
@@ -9,11 +13,11 @@ object CallerMapRoadListenerManager {
|
||||
|
||||
interface OnRoadListener {
|
||||
|
||||
fun onRoadIdInfo(roadId: String){}
|
||||
fun onRoadIdInfo(roadId: String) {}
|
||||
|
||||
fun onStopLineInfo(info: StopLine){}
|
||||
fun onStopLineInfo(info: StopLine) {}
|
||||
|
||||
fun onRoadChange(cross: Boolean){}
|
||||
fun onRoadChange(cross: Boolean) {}
|
||||
}
|
||||
|
||||
private val listeners by lazy {
|
||||
@@ -48,15 +52,21 @@ object CallerMapRoadListenerManager {
|
||||
}
|
||||
|
||||
private var mCross: Boolean by Delegates.observable(false) { _, oldValue, newValue ->
|
||||
if(oldValue != newValue){
|
||||
Logger.d("emArrow","cross : $newValue")
|
||||
if (oldValue != newValue) {
|
||||
CallerLogger.d("$M_MAP onRoadChange", newValue)
|
||||
listeners.forEach { entry ->
|
||||
entry.value.onRoadChange(newValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun invokeRoadChange(cross: Boolean) {
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_HD_MAP,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_MAP,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_HD_MAP_ROAD_CROSS,
|
||||
paramIndexes = [0, 1]
|
||||
)
|
||||
fun invokeRoadChange(cross: Boolean, roadCross: RoadCross) {
|
||||
mCross = cross
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user