[6.1.0] fix bug of cross road , spilt the cross and cross change to identify false
This commit is contained in:
@@ -51,11 +51,14 @@ object CallerMapRoadListenerManager {
|
||||
}
|
||||
}
|
||||
|
||||
private var mCross: Boolean by Delegates.observable(false) { _, oldValue, newValue ->
|
||||
private var mCross: Int by Delegates.observable(-1) { _, oldValue, newValue ->
|
||||
if (oldValue != newValue) {
|
||||
CallerLogger.d("$M_MAP onRoadChange", newValue)
|
||||
listeners.forEach { entry ->
|
||||
entry.value.onRoadChange(newValue)
|
||||
when(newValue){
|
||||
1,2 -> entry.value.onRoadChange(false)
|
||||
else -> entry.value.onRoadChange(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,7 +69,7 @@ object CallerMapRoadListenerManager {
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_HD_MAP_ROAD_CROSS,
|
||||
paramIndexes = [0, 1]
|
||||
)
|
||||
fun invokeRoadChange(cross: Boolean, roadCross: RoadCross) {
|
||||
fun invokeRoadChange(cross: Int, roadCross: RoadCross) {
|
||||
mCross = cross
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user