[3.4.0-map-sdk] loc wgs84 opt , get instead of callback , add func of traffic light cross road
This commit is contained in:
@@ -207,18 +207,18 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
|
||||
}
|
||||
}
|
||||
|
||||
private var roadCross:RoadCross? by Delegates.observable(null){ _,oldValue,newValue ->
|
||||
private var roadCross: RoadCross? by Delegates.observable(null) { _, oldValue, newValue ->
|
||||
oldValue?.let {
|
||||
//对驶入驶出路口做二次过滤,防止多次回调
|
||||
if(it.status == 0 && newValue!!.status == 1){
|
||||
if (it.status == 0 && newValue!!.status == 1) {
|
||||
//进入路口
|
||||
i("$M_MAP$TAG","进入路口 :${newValue.cross_id}")
|
||||
invokeRoadChange(true)
|
||||
i("$M_MAP$TAG", "进入路口 :${newValue.cross_id}")
|
||||
invokeRoadChange(true, 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) || (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(false)
|
||||
i("$M_MAP$TAG", "驶出路口 上个:${oldValue.cross_id_end} , 下个:${newValue.cross_id_end}")
|
||||
invokeRoadChange(false, newValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -232,7 +232,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
|
||||
|
||||
override fun onStopLineInfo(stopLine: StopLine?) {
|
||||
stopLine?.let {
|
||||
if(it.road_id.isNotEmpty() && it.points.size > 0){
|
||||
if (it.road_id.isNotEmpty() && it.points.size > 0) {
|
||||
d(M_MAP + TAG, "onStopLineInfo: $it")
|
||||
invokeListenersOnStopLineGet(it)
|
||||
}
|
||||
@@ -252,7 +252,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
|
||||
}
|
||||
|
||||
override fun changeMapVisualAngle(angelMode: VisualAngleMode, mogoLatLng: MogoLatLng?) {
|
||||
if(visualLock){
|
||||
if (visualLock) {
|
||||
e(M_MAP + TAG, "视角切换已锁定")
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user