[6.1.0] fix bug of cross road , spilt the cross and cross change to identify false
This commit is contained in:
@@ -211,14 +211,20 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
|
||||
oldValue?.let {
|
||||
//对驶入驶出路口做二次过滤,防止多次回调
|
||||
if (it.status == 0 && newValue!!.status == 1) {
|
||||
//进入路口
|
||||
//径直进入路口
|
||||
i("$M_MAP$TAG", "进入路口 :${newValue.cross_id}")
|
||||
invokeRoadChange(true, newValue)
|
||||
invokeRoadChange(0, newValue)
|
||||
}
|
||||
if ((it.status == 1 && newValue!!.status == 0) || (newValue!!.cross_id_end.isNotEmpty() && oldValue.cross_id_end != newValue.cross_id_end)) {
|
||||
//驶出路口
|
||||
if ((it.status == 1 && newValue!!.status == 0)) {
|
||||
//径直驶出路口
|
||||
i("$M_MAP$TAG", "驶出路口 上个:${oldValue.cross_id_end} , 下个:${newValue.cross_id_end}")
|
||||
invokeRoadChange(false, newValue)
|
||||
invokeRoadChange(1, newValue)
|
||||
return@let
|
||||
}
|
||||
if((newValue!!.cross_id_end.isNotEmpty() && oldValue.cross_id_end != newValue.cross_id_end)){
|
||||
//路口发生变化
|
||||
i("$M_MAP$TAG", "路段发生变化 上个:${oldValue.cross_id_end} , 下个:${newValue.cross_id_end}")
|
||||
invokeRoadChange(2, newValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user