[6.5.0] road cross func
This commit is contained in:
@@ -7,6 +7,7 @@ import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.HandlerThread
|
||||
import android.text.TextUtils
|
||||
import android.util.Log
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import com.autonavi.nge.map.OnMapScreenShotListener
|
||||
@@ -251,6 +252,7 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
|
||||
|
||||
private var roadCross: RoadCross? by Delegates.observable(null) { _, oldValue, newValue ->
|
||||
oldValue?.let {
|
||||
Log.d("$M_MAP$TAG", "onRoadCrossInfo oldValue:$oldValue, newValue:$newValue")
|
||||
//对驶入驶出路口做二次过滤,防止多次回调
|
||||
if (it.status == 0 && newValue!!.status == 1) {
|
||||
//径直进入路口
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.map.overlay
|
||||
|
||||
import android.graphics.*
|
||||
import android.view.View
|
||||
import com.mogo.eagle.core.data.map.*
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
@@ -63,6 +64,12 @@ internal class MoGoOverlayManagerImpl: IMoGoOverlayManager {
|
||||
}
|
||||
}
|
||||
|
||||
override fun setInfoWindowView(id: String, view: View) {
|
||||
points.filter { it.key.id == id && it.value.isVisible() }.onEach {
|
||||
it.value.setInfoWindowView(view)
|
||||
}
|
||||
}
|
||||
|
||||
override fun hidePoint(id: String) {
|
||||
points.filter { it.key.id == id && it.value.isVisible() }.onEach {
|
||||
it.value.setVisible(false)
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
package com.mogo.map.overlay.wrapper.point
|
||||
|
||||
import com.mogo.eagle.core.data.map.*
|
||||
import android.view.View
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng
|
||||
import com.mogo.map.overlay.point.Point.Options
|
||||
import com.mogo.map.overlay.proxy.point.*
|
||||
import com.mogo.map.overlay.proxy.point.IMapPointOverlay
|
||||
import com.mogo.map.utils.ObjectUtils
|
||||
import com.zhidaoauto.map.data.point.LonLatPoint
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.Marker
|
||||
import com.zhidaoauto.map.sdk.open.view.MapAutoView
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.Marker
|
||||
|
||||
class AMapPointWrapper(private val id: String, private val delegate: Marker, private val mMapAutoView: MapAutoView): IMapPointOverlay {
|
||||
class AMapPointWrapper(
|
||||
private val id: String,
|
||||
private val delegate: Marker,
|
||||
private val mMapAutoView: MapAutoView
|
||||
) : IMapPointOverlay {
|
||||
|
||||
private val isDestroyed by lazy { AtomicBoolean(false) }
|
||||
|
||||
@@ -54,6 +59,10 @@ class AMapPointWrapper(private val id: String, private val delegate: Marker, pri
|
||||
return delegate.isVisible()
|
||||
}
|
||||
|
||||
override fun setInfoWindowView(view: View) {
|
||||
delegate.setInfoWindowView(view)
|
||||
}
|
||||
|
||||
override fun setToTop() {
|
||||
if (isDestroyed.get() || isRemoved.get()) {
|
||||
return
|
||||
@@ -72,11 +81,15 @@ class AMapPointWrapper(private val id: String, private val delegate: Marker, pri
|
||||
if (isDestroyed.get() || isRemoved.get()) {
|
||||
return
|
||||
}
|
||||
delegate.setMarkerOptions(ObjectUtils.fromMogo(opt,mMapAutoView))
|
||||
delegate.setMarkerOptions(ObjectUtils.fromMogo(opt, mMapAutoView))
|
||||
}
|
||||
|
||||
override fun addDynamicAnchorPosition(point: MogoLatLng, angle: Float, duration: Long) {
|
||||
delegate.addDynamicAnchorPostion(LonLatPoint(point.lon, point.lat, angle.toDouble()), System.currentTimeMillis(), duration.toInt())
|
||||
delegate.addDynamicAnchorPostion(
|
||||
LonLatPoint(point.lon, point.lat, angle.toDouble()),
|
||||
System.currentTimeMillis(),
|
||||
duration.toInt()
|
||||
)
|
||||
}
|
||||
|
||||
override fun onRemove(action: (id: String) -> Unit) {
|
||||
|
||||
Reference in New Issue
Block a user