[6.5.0] merge

This commit is contained in:
EmArrow
2024-06-27 19:05:12 +08:00
parent 1f06c9a89e
commit 46f3eccecf
47 changed files with 908 additions and 127 deletions

View File

@@ -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)
}

View File

@@ -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);