[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);
|
||||
|
||||
Reference in New Issue
Block a user