地图模块适配
This commit is contained in:
@@ -16,6 +16,7 @@ import android.view.MotionEvent
|
||||
import android.view.SurfaceHolder
|
||||
import android.view.View
|
||||
import com.alibaba.fastjson.JSON
|
||||
import com.zhidaoauto.map.data.point.LonLatPoint
|
||||
import com.zhidaoauto.map.sdk.inner.CompileConfig
|
||||
import com.zhidaoauto.map.sdk.inner.CompileConfig.DEBUG
|
||||
import com.zhidaoauto.map.sdk.inner.abs.IEventController
|
||||
@@ -34,7 +35,6 @@ import com.zhidaoauto.map.sdk.open.abs.view.IMapStyleParams
|
||||
import com.zhidaoauto.map.sdk.open.marker.Marker
|
||||
import com.zhidaoauto.map.sdk.open.marker.MarkerInfo
|
||||
import com.zhidaoauto.map.sdk.open.marker.MarkerOptions
|
||||
import com.zhidaoauto.map.sdk.open.query.LonLatPoint
|
||||
import com.zhidaoauto.map.sdk.open.tools.MapTools
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
@@ -216,7 +216,7 @@ class MapView(context: Context, private val mMapStyleParams: IMapStyleParams, pr
|
||||
|
||||
|
||||
override fun toScreen() {
|
||||
isScreen = true
|
||||
isScreen.set(true)
|
||||
}
|
||||
|
||||
override fun setVrMode(isVr: Boolean) {
|
||||
@@ -606,7 +606,7 @@ class MapView(context: Context, private val mMapStyleParams: IMapStyleParams, pr
|
||||
}
|
||||
|
||||
var snapshotBitmap: Bitmap? = null
|
||||
var isScreen = false
|
||||
var isScreen:AtomicBoolean = AtomicBoolean()
|
||||
|
||||
private var doubles = doubleArrayOf()
|
||||
open fun getDoubles(): DoubleArray {
|
||||
@@ -655,8 +655,8 @@ class MapView(context: Context, private val mMapStyleParams: IMapStyleParams, pr
|
||||
msg.what = RENDER_CHANGE
|
||||
msg.arg1 = (System.currentTimeMillis()-time).toInt()
|
||||
mHandler.sendMessage(msg)
|
||||
if (isScreen) {
|
||||
isScreen = false
|
||||
if (isScreen.get()) {
|
||||
isScreen.set(false)
|
||||
snapshotBitmap = createBitmapFromGLSurface(0, 0, width, height, gl)
|
||||
mEventController?.dispatchScreenShotListener(snapshotBitmap)
|
||||
}
|
||||
@@ -897,7 +897,9 @@ class MapView(context: Context, private val mMapStyleParams: IMapStyleParams, pr
|
||||
val markerInfo = jsonToObj(resultInfo)
|
||||
|
||||
if (markerInfo != null) {
|
||||
var marker: Marker = Marker(MarkerOptions(markerInfo.id,null).setGps(true).position(LonLatPoint(markerInfo.lon, markerInfo.lat)).setAssInfo(markerInfo.assInfo),mMapController,mMarkerCall)
|
||||
var marker: Marker = Marker(MarkerOptions(markerInfo.id,null).setGps(true).position(
|
||||
LonLatPoint(markerInfo.lon, markerInfo.lat)
|
||||
).setAssInfo(markerInfo.assInfo),mMapController,mMarkerCall)
|
||||
lastClickMarker?.let {
|
||||
if (!TextUtils.equals(it.getId(), marker.getId())) {
|
||||
it.hideInfoWindow()
|
||||
|
||||
Reference in New Issue
Block a user