[6.5.0] merge
This commit is contained in:
@@ -45,6 +45,7 @@ class MyLocationStyle(
|
||||
private var is3D: Boolean = false
|
||||
private var carId: Int = 0
|
||||
private var isDisplayAnim: Boolean = true
|
||||
private var showSelfMarker:Boolean = true // 前置调用/或后置更新draw
|
||||
private var mMarker: Marker? = null
|
||||
|
||||
private var lastExecuteTime = -1L
|
||||
@@ -236,6 +237,9 @@ class MyLocationStyle(
|
||||
options.animMarkerRes(guangquanResId, mMapController)
|
||||
}
|
||||
mMarker = mMarkerController?.addSelfCar(options)
|
||||
if(!showSelfMarker){
|
||||
mMarker?.setVisible(false)
|
||||
}
|
||||
carId = resId
|
||||
if (CompileConfig.DEBUG) {
|
||||
Log.i(
|
||||
@@ -335,10 +339,12 @@ class MyLocationStyle(
|
||||
|
||||
|
||||
fun hideCar() {
|
||||
showSelfMarker = false
|
||||
mMarker?.setVisible(false)
|
||||
}
|
||||
|
||||
fun showCar() {
|
||||
showSelfMarker = true
|
||||
mMarker?.setVisible(true)
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ object BitmapDescriptorFactory {
|
||||
View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED)
|
||||
)
|
||||
view.layout(0, 0, view.measuredWidth, view.measuredHeight)
|
||||
val bitmap = Bitmap.createBitmap(view.width, view.height, Bitmap.Config.ARGB_8888);
|
||||
val bitmap = Bitmap.createBitmap(view.width, view.height, Bitmap.Config.ARGB_8888)
|
||||
val canvas = Canvas(bitmap)
|
||||
// canvas.drawColor(Color.WHITE);
|
||||
view.draw(canvas);
|
||||
|
||||
@@ -10,6 +10,7 @@ class MogoMap private constructor() {
|
||||
private const val TAG = "MogoMap"
|
||||
|
||||
const val DEFAULT = "Default"
|
||||
const val MAP_ROAM = "MapRoam" //漫游地图实例
|
||||
|
||||
@JvmStatic
|
||||
val mapInstance by lazy(LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
|
||||
@@ -36,7 +36,6 @@ import com.mogo.map.listener.MogoMapListenerHandler.Companion.mogoMapListenerHan
|
||||
import com.mogo.map.uicontroller.*
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.MODE_MEDIUM_SIGHT
|
||||
import com.mogo.map.utils.MapTraceUtil
|
||||
import com.mogo.map.utils.MogoMapUtils
|
||||
import com.mogo.map.utils.MogoMapUtils.getLatLngBounds
|
||||
import com.mogo.map.utils.ObjectUtils
|
||||
import com.zhidaoauto.map.data.point.LonLatPoint
|
||||
@@ -387,18 +386,22 @@ class AMapViewWrapper(mMapView: MapAutoView) : IMogoMapView, IMogoMapUIControlle
|
||||
override fun showMyLocation(visible: Boolean) {
|
||||
d(M_MAP + TAG, "showMyLocation1 $visible")
|
||||
// 如果是VR模式
|
||||
if (isVrMold) {
|
||||
return
|
||||
}
|
||||
// if (isVrMold) {
|
||||
// return
|
||||
// }
|
||||
// 不是VR模式情况强制刷新下
|
||||
if (checkAMapView()) {
|
||||
val style = mMapView.getMapAutoViewHelper()!!
|
||||
.getMyLocationStyle()
|
||||
if (visible) {
|
||||
// 强制刷新一遍车标
|
||||
style!!.myLocationIcon(mCarCursorOption!!.carCursorRes)
|
||||
style?.let {
|
||||
if (visible) {
|
||||
// 强制刷新一遍车标
|
||||
it.myLocationIcon(mCarCursorOption!!.carCursorRes)
|
||||
}else{
|
||||
it.hideCar()
|
||||
}
|
||||
mMapView.getMapAutoViewHelper()!!.setMyLocationStyle(style)
|
||||
}
|
||||
mMapView.getMapAutoViewHelper()!!.setMyLocationStyle(style!!)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ class AMapWrapper(map: MapAutoViewHelper?, mapView: MapAutoView, controller: IMo
|
||||
return AMapPolylineWrapper(options.id, delegate, mMapView)
|
||||
}
|
||||
|
||||
var batchMarkerOptions = BatchMarkerOptions()
|
||||
private val batchMarkerOptions = BatchMarkerOptions()
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
override fun updateBatchMarkerPosition(optionsArrayList: HashMap<String, TrackedObject>?) {
|
||||
|
||||
@@ -52,6 +52,10 @@ open class MogoMapView : MogoBaseMapView, ILifeCycle {
|
||||
}
|
||||
}
|
||||
|
||||
override fun getInstanceTag(): String {
|
||||
return ""
|
||||
}
|
||||
|
||||
/**
|
||||
* 子类实现
|
||||
* 代码StyleParams和XML初始化设置同时仅支持一种
|
||||
@@ -61,10 +65,6 @@ open class MogoMapView : MogoBaseMapView, ILifeCycle {
|
||||
protected val styleParams: MapStyleParams?
|
||||
protected get() = null
|
||||
|
||||
override fun getInstanceTag(): String {
|
||||
return MogoMap.DEFAULT
|
||||
}
|
||||
|
||||
override fun onCreate(bundle: Bundle?) {
|
||||
super.onCreate(bundle)
|
||||
d(TAG, "onCreate")
|
||||
|
||||
Reference in New Issue
Block a user