修改点击聚合marker崩溃问题
This commit is contained in:
parent
71948187c3
commit
4ef07f470d
@ -206,7 +206,7 @@ class MainActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//捕捉列表变化回调
|
//捕捉列表变化回调
|
||||||
viewModel.liveDataNoteIdList.observe(this) {
|
viewModel.liveDataNoteId.observe(this) {
|
||||||
//跳转到质检数据页面
|
//跳转到质检数据页面
|
||||||
//获取右侧fragment容器
|
//获取右侧fragment容器
|
||||||
val naviController = findNavController(R.id.main_activity_right_fragment)
|
val naviController = findNavController(R.id.main_activity_right_fragment)
|
||||||
@ -214,15 +214,13 @@ class MainActivity : BaseActivity() {
|
|||||||
naviController.currentDestination?.let { navDestination ->
|
naviController.currentDestination?.let { navDestination ->
|
||||||
when (navDestination.id) {
|
when (navDestination.id) {
|
||||||
R.id.RightEmptyFragment -> {
|
R.id.RightEmptyFragment -> {
|
||||||
if (it.size == 1) {
|
|
||||||
val bundle = Bundle()
|
val bundle = Bundle()
|
||||||
bundle.putString("NoteId", it[0])
|
bundle.putString("NoteId", it)
|
||||||
naviController.navigate(R.id.NoteFragment, bundle)
|
naviController.navigate(R.id.NoteFragment, bundle)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
viewModel.liveDataTaskLink.observe(this) {
|
viewModel.liveDataTaskLink.observe(this) {
|
||||||
val bundle = Bundle()
|
val bundle = Bundle()
|
||||||
@ -628,7 +626,12 @@ class MainActivity : BaseActivity() {
|
|||||||
mapController.mMapView.setScaleBarLayer(GLViewport.Position.BOTTOM_CENTER, 128, 65)
|
mapController.mMapView.setScaleBarLayer(GLViewport.Position.BOTTOM_CENTER, 128, 65)
|
||||||
}
|
}
|
||||||
mapController.mMapView.vtmMap.animator()
|
mapController.mMapView.vtmMap.animator()
|
||||||
.animateTo(GeoPoint( mapController.mMapView.vtmMap.mapPosition.geoPoint.latitude,mapController.mMapView.vtmMap.mapPosition.geoPoint.longitude))
|
.animateTo(
|
||||||
|
GeoPoint(
|
||||||
|
mapController.mMapView.vtmMap.mapPosition.geoPoint.latitude,
|
||||||
|
mapController.mMapView.vtmMap.mapPosition.geoPoint.longitude
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.N)
|
@RequiresApi(Build.VERSION_CODES.N)
|
||||||
|
@ -75,7 +75,7 @@ class MainViewModel @Inject constructor(
|
|||||||
val liveDataQsRecordIdList = MutableLiveData<List<String>>()
|
val liveDataQsRecordIdList = MutableLiveData<List<String>>()
|
||||||
|
|
||||||
//地图点击捕捉到的标签ID列表
|
//地图点击捕捉到的标签ID列表
|
||||||
val liveDataNoteIdList = MutableLiveData<List<String>>()
|
val liveDataNoteId = MutableLiveData<String>()
|
||||||
|
|
||||||
//地图点击捕捉到的轨迹列表
|
//地图点击捕捉到的轨迹列表
|
||||||
val liveDataNILocationList = MutableLiveData<NiLocation>()
|
val liveDataNILocationList = MutableLiveData<NiLocation>()
|
||||||
@ -159,8 +159,8 @@ class MainViewModel @Inject constructor(
|
|||||||
liveDataQsRecordIdList.value = list
|
liveDataQsRecordIdList.value = list
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onNoteList(list: MutableList<String>) {
|
override fun onNote(id: String) {
|
||||||
liveDataNoteIdList.value = list
|
liveDataNoteId.value = id
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onNiLocation(item: NiLocation) {
|
override fun onNiLocation(item: NiLocation) {
|
||||||
@ -182,9 +182,7 @@ class MainViewModel @Inject constructor(
|
|||||||
// testPoint = it
|
// testPoint = it
|
||||||
//线选择状态
|
//线选择状态
|
||||||
if (bSelectRoad) {
|
if (bSelectRoad) {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
|
||||||
captureLink(it)
|
captureLink(it)
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
captureItem(it)
|
captureItem(it)
|
||||||
}
|
}
|
||||||
@ -249,8 +247,7 @@ class MainViewModel @Inject constructor(
|
|||||||
//加载轨迹数据
|
//加载轨迹数据
|
||||||
val id = sharedPreferences.getInt(Constant.SELECT_TASK_ID, -1)
|
val id = sharedPreferences.getInt(Constant.SELECT_TASK_ID, -1)
|
||||||
val list: List<NiLocation>? = TraceDataBase.getDatabase(
|
val list: List<NiLocation>? = TraceDataBase.getDatabase(
|
||||||
mapController.mMapView.context,
|
mapController.mMapView.context, Constant.USER_DATA_PATH
|
||||||
Constant.USER_DATA_PATH
|
|
||||||
).niLocationDao.findToTaskIdAll(id.toString())
|
).niLocationDao.findToTaskIdAll(id.toString())
|
||||||
if (list != null) {
|
if (list != null) {
|
||||||
for (location in list) {
|
for (location in list) {
|
||||||
@ -268,11 +265,13 @@ class MainViewModel @Inject constructor(
|
|||||||
viewModelScope.launch(Dispatchers.Default) {
|
viewModelScope.launch(Dispatchers.Default) {
|
||||||
//用于定位点捕捉道路
|
//用于定位点捕捉道路
|
||||||
mapController.locationLayerHandler.niLocationFlow.collectLatest { location ->
|
mapController.locationLayerHandler.niLocationFlow.collectLatest { location ->
|
||||||
if (!isSelectRoad()&&!GeometryTools.isCheckError(location.longitude,location.latitude)) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
if (!isSelectRoad() && !GeometryTools.isCheckError(
|
||||||
|
location.longitude, location.latitude
|
||||||
|
)
|
||||||
|
) {
|
||||||
captureLink(
|
captureLink(
|
||||||
GeoPoint(
|
GeoPoint(
|
||||||
location.latitude,
|
location.latitude, location.longitude
|
||||||
location.longitude
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -309,8 +308,11 @@ class MainViewModel @Inject constructor(
|
|||||||
//增加间距判断
|
//增加间距判断
|
||||||
if (lastNiLocaion != null) {
|
if (lastNiLocaion != null) {
|
||||||
val disance = GeometryTools.getDistance(
|
val disance = GeometryTools.getDistance(
|
||||||
location.latitude, location.longitude,
|
location.latitude,
|
||||||
lastNiLocaion!!.latitude, lastNiLocaion!!.longitude)
|
location.longitude,
|
||||||
|
lastNiLocaion!!.latitude,
|
||||||
|
lastNiLocaion!!.longitude
|
||||||
|
)
|
||||||
//相距差距大于2.5米以上进行存储
|
//相距差距大于2.5米以上进行存储
|
||||||
if (disance > 2.5) {
|
if (disance > 2.5) {
|
||||||
traceDataBase.niLocationDao.insert(location)
|
traceDataBase.niLocationDao.insert(location)
|
||||||
@ -501,12 +503,10 @@ class MainViewModel @Inject constructor(
|
|||||||
try {
|
try {
|
||||||
if (!mCameraDialog!!.getmShareUtil().connectstate) {
|
if (!mCameraDialog!!.getmShareUtil().connectstate) {
|
||||||
mCameraDialog!!.updateCameraResources(
|
mCameraDialog!!.updateCameraResources(
|
||||||
1,
|
1, mCameraDialog!!.getmDeviceNum()
|
||||||
mCameraDialog!!.getmDeviceNum()
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
TakePhotoManager.getInstance()
|
TakePhotoManager.getInstance().getCameraVedioClent(mCameraDialog!!.getmDeviceNum())
|
||||||
.getCameraVedioClent(mCameraDialog!!.getmDeviceNum())
|
|
||||||
.StopSearch()
|
.StopSearch()
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,13 @@
|
|||||||
package com.navinfo.collect.library.map.handler
|
package com.navinfo.collect.library.map.handler
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.SharedPreferences
|
|
||||||
import android.graphics.BitmapFactory
|
import android.graphics.BitmapFactory
|
||||||
import android.graphics.Canvas
|
import android.graphics.Canvas
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.core.content.res.ResourcesCompat
|
import androidx.core.content.res.ResourcesCompat
|
||||||
import androidx.lifecycle.lifecycleScope
|
|
||||||
import com.navinfo.collect.library.R
|
import com.navinfo.collect.library.R
|
||||||
import com.navinfo.collect.library.data.dao.impl.TraceDataBase
|
|
||||||
import com.navinfo.collect.library.data.entity.NiLocation
|
import com.navinfo.collect.library.data.entity.NiLocation
|
||||||
import com.navinfo.collect.library.data.entity.NoteBean
|
import com.navinfo.collect.library.data.entity.NoteBean
|
||||||
import com.navinfo.collect.library.data.entity.QsRecordBean
|
import com.navinfo.collect.library.data.entity.QsRecordBean
|
||||||
@ -21,11 +18,6 @@ import com.navinfo.collect.library.map.layers.MyItemizedLayer
|
|||||||
import com.navinfo.collect.library.map.layers.NoteLineLayer
|
import com.navinfo.collect.library.map.layers.NoteLineLayer
|
||||||
import com.navinfo.collect.library.utils.GeometryTools
|
import com.navinfo.collect.library.utils.GeometryTools
|
||||||
import com.navinfo.collect.library.utils.StringUtil
|
import com.navinfo.collect.library.utils.StringUtil
|
||||||
import io.realm.Realm
|
|
||||||
import io.realm.kotlin.where
|
|
||||||
import kotlinx.coroutines.Dispatchers
|
|
||||||
import kotlinx.coroutines.launch
|
|
||||||
import kotlinx.coroutines.withContext
|
|
||||||
import org.locationtech.jts.geom.Geometry
|
import org.locationtech.jts.geom.Geometry
|
||||||
import org.locationtech.jts.geom.LineString
|
import org.locationtech.jts.geom.LineString
|
||||||
import org.locationtech.jts.geom.Polygon
|
import org.locationtech.jts.geom.Polygon
|
||||||
@ -34,19 +26,11 @@ import org.oscim.backend.CanvasAdapter
|
|||||||
import org.oscim.backend.canvas.Bitmap
|
import org.oscim.backend.canvas.Bitmap
|
||||||
import org.oscim.backend.canvas.Paint
|
import org.oscim.backend.canvas.Paint
|
||||||
import org.oscim.core.GeoPoint
|
import org.oscim.core.GeoPoint
|
||||||
import org.oscim.layers.marker.ItemizedLayer
|
import org.oscim.layers.marker.*
|
||||||
import org.oscim.layers.marker.ItemizedLayer.OnItemGestureListener
|
import org.oscim.layers.marker.ItemizedLayer.OnItemGestureListener
|
||||||
import org.oscim.layers.marker.MarkerInterface
|
import org.oscim.layers.vector.geometries.*
|
||||||
import org.oscim.layers.marker.MarkerItem
|
|
||||||
import org.oscim.layers.marker.MarkerRendererFactory
|
|
||||||
import org.oscim.layers.marker.MarkerSymbol
|
|
||||||
import org.oscim.layers.vector.geometries.Drawable
|
|
||||||
import org.oscim.layers.vector.geometries.LineDrawable
|
|
||||||
import org.oscim.layers.vector.geometries.PointDrawable
|
|
||||||
import org.oscim.layers.vector.geometries.PolygonDrawable
|
|
||||||
import org.oscim.layers.vector.geometries.Style
|
|
||||||
import org.oscim.map.Map
|
import org.oscim.map.Map
|
||||||
import java.util.Locale
|
import java.util.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* marker 操作
|
* marker 操作
|
||||||
@ -74,9 +58,7 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
|||||||
/**
|
/**
|
||||||
* 画布
|
* 画布
|
||||||
*/
|
*/
|
||||||
private val canvas: org.oscim.backend.canvas.Canvas by lazy {
|
private val canvas: org.oscim.backend.canvas.Canvas = CanvasAdapter.newCanvas()
|
||||||
CanvasAdapter.newCanvas()
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 默认marker图层
|
* 默认marker图层
|
||||||
@ -88,36 +70,72 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
|||||||
|
|
||||||
val markerSymbol = MarkerSymbol(
|
val markerSymbol = MarkerSymbol(
|
||||||
mDefaultBitmap,
|
mDefaultBitmap,
|
||||||
MarkerSymbol.HotspotPlace.BOTTOM_CENTER
|
MarkerSymbol.HotspotPlace.CENTER
|
||||||
)
|
)
|
||||||
val layer = ItemizedLayer(
|
val layer = ItemizedLayer(
|
||||||
mapView.vtmMap,
|
mapView.vtmMap,
|
||||||
ArrayList(),
|
|
||||||
markerSymbol,
|
markerSymbol,
|
||||||
object : OnItemGestureListener<MarkerInterface> {
|
|
||||||
override fun onItemSingleTapUp(index: Int, item: MarkerInterface?): Boolean {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onItemLongPress(index: Int, item: MarkerInterface?): Boolean {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
addLayer(layer, NIMapView.LAYER_GROUPS.OPERATE_MARKER)
|
addLayer(layer, NIMapView.LAYER_GROUPS.OPERATE_MARKER)
|
||||||
layer
|
layer
|
||||||
}
|
}
|
||||||
|
|
||||||
private var niLocationBitmap: Bitmap? = null
|
private val niLocationBitmap: Bitmap by lazy {
|
||||||
private var niLocationBitmap1: Bitmap? = null
|
AndroidBitmap(
|
||||||
private var niLocationBitmap2: Bitmap? = null
|
BitmapFactory.decodeResource(
|
||||||
private var niLocationBitmap3: Bitmap? = null
|
context.resources,
|
||||||
|
R.mipmap.icon_gps
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
private val niLocationBitmap1: Bitmap by lazy {
|
||||||
|
AndroidBitmap(
|
||||||
|
BitmapFactory.decodeResource(
|
||||||
|
context.resources,
|
||||||
|
R.mipmap.icon_gps_1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
private val niLocationBitmap2: Bitmap by lazy {
|
||||||
|
AndroidBitmap(
|
||||||
|
BitmapFactory.decodeResource(
|
||||||
|
context.resources,
|
||||||
|
R.mipmap.icon_nilocation
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
private val niLocationBitmap3: Bitmap by lazy {
|
||||||
|
AndroidBitmap(
|
||||||
|
BitmapFactory.decodeResource(
|
||||||
|
context.resources,
|
||||||
|
R.mipmap.icon_nilocation_1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 评测数据marker 图层
|
* 评测数据marker 图层
|
||||||
*/
|
*/
|
||||||
private val qsRecordItemizedLayer: MyItemizedLayer by lazy {
|
private val qsRecordItemizedLayer: MyItemizedLayer by lazy {
|
||||||
|
val bitmapPoi: Bitmap = AndroidBitmap(
|
||||||
|
BitmapFactory.decodeResource(
|
||||||
|
mContext.resources,
|
||||||
|
R.mipmap.map_icon_blue2
|
||||||
|
)
|
||||||
|
)
|
||||||
|
val symbol = MarkerSymbol(bitmapPoi, MarkerSymbol.HotspotPlace.BOTTOM_CENTER)
|
||||||
|
val markerRendererFactory = MarkerRendererFactory { markerLayer ->
|
||||||
|
object : ClusterMarkerRenderer(
|
||||||
|
mContext,
|
||||||
|
markerLayer,
|
||||||
|
symbol,
|
||||||
|
ClusterStyle(
|
||||||
|
org.oscim.backend.canvas.Color.WHITE,
|
||||||
|
org.oscim.backend.canvas.Color.BLUE
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
}
|
||||||
val layer = MyItemizedLayer(
|
val layer = MyItemizedLayer(
|
||||||
mMapView.vtmMap,
|
mMapView.vtmMap,
|
||||||
mutableListOf(),
|
mutableListOf(),
|
||||||
@ -160,24 +178,12 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
|||||||
*/
|
*/
|
||||||
private val niLocationItemizedLayer: ItemizedLayer by lazy {
|
private val niLocationItemizedLayer: ItemizedLayer by lazy {
|
||||||
|
|
||||||
niLocationBitmap =
|
val symbol = MarkerSymbol(niLocationBitmap, MarkerSymbol.HotspotPlace.CENTER)
|
||||||
AndroidBitmap(BitmapFactory.decodeResource(context.resources, R.mipmap.icon_gps))
|
|
||||||
niLocationBitmap1 =
|
|
||||||
AndroidBitmap(BitmapFactory.decodeResource(context.resources, R.mipmap.icon_gps_1))
|
|
||||||
niLocationBitmap2 =
|
|
||||||
AndroidBitmap(BitmapFactory.decodeResource(context.resources, R.mipmap.icon_nilocation))
|
|
||||||
niLocationBitmap3 = AndroidBitmap(
|
|
||||||
BitmapFactory.decodeResource(
|
|
||||||
context.resources,
|
|
||||||
R.mipmap.icon_nilocation_1
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
val layer = ItemizedLayer(
|
val layer = ItemizedLayer(
|
||||||
mapView.vtmMap,
|
mapView.vtmMap,
|
||||||
mutableListOf(),
|
symbol,
|
||||||
markerRendererFactory,
|
)
|
||||||
object : OnItemGestureListener<MarkerInterface> {
|
layer.setOnItemGestureListener(object : OnItemGestureListener<MarkerInterface> {
|
||||||
override fun onItemSingleTapUp(index: Int, item: MarkerInterface?): Boolean {
|
override fun onItemSingleTapUp(index: Int, item: MarkerInterface?): Boolean {
|
||||||
itemListener?.let {
|
itemListener?.let {
|
||||||
it.onNiLocation((niLocationItemizedLayer.itemList[index] as MarkerItem).uid as NiLocation)
|
it.onNiLocation((niLocationItemizedLayer.itemList[index] as MarkerItem).uid as NiLocation)
|
||||||
@ -190,7 +196,6 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
addLayer(layer, NIMapView.LAYER_GROUPS.OPERATE_MARKER)
|
addLayer(layer, NIMapView.LAYER_GROUPS.OPERATE_MARKER)
|
||||||
layer
|
layer
|
||||||
}
|
}
|
||||||
@ -207,69 +212,33 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
|||||||
/**
|
/**
|
||||||
* 便签图标图层
|
* 便签图标图层
|
||||||
*/
|
*/
|
||||||
private val noteLayer: MyItemizedLayer by lazy {
|
private val noteLayer: ItemizedLayer by lazy {
|
||||||
|
val bitmap =
|
||||||
val layer = MyItemizedLayer(
|
AndroidBitmap(BitmapFactory.decodeResource(context.resources, noteResId))
|
||||||
|
val symbol = MarkerSymbol(bitmap, MarkerSymbol.HotspotPlace.CENTER)
|
||||||
|
val layer = ItemizedLayer(
|
||||||
mMapView.vtmMap,
|
mMapView.vtmMap,
|
||||||
mutableListOf(),
|
symbol,
|
||||||
markerRendererFactory,
|
)
|
||||||
object : MyItemizedLayer.OnItemGestureListener {
|
layer.setOnItemGestureListener(object : OnItemGestureListener<MarkerInterface> {
|
||||||
override fun onItemSingleTapUp(
|
override fun onItemSingleTapUp(index: Int, item: MarkerInterface?): Boolean {
|
||||||
list: MutableList<Int>,
|
|
||||||
nearest: Int
|
|
||||||
): Boolean {
|
|
||||||
itemListener?.let {
|
itemListener?.let {
|
||||||
val idList = mutableListOf<String>()
|
val marker = layer.itemList[index]
|
||||||
if (list.size == 0) {
|
if (marker is MarkerItem)
|
||||||
|
it.onNote(marker.title)
|
||||||
} else {
|
|
||||||
for (i in list) {
|
|
||||||
val markerInterface: MarkerInterface =
|
|
||||||
noteLayer.itemList[i]
|
|
||||||
if (markerInterface is MarkerItem) {
|
|
||||||
idList.add(markerInterface.title)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
it.onNoteList(idList.distinct().toMutableList())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onItemLongPress(
|
override fun onItemLongPress(index: Int, item: MarkerInterface?): Boolean {
|
||||||
list: MutableList<Int>?,
|
|
||||||
nearest: Int
|
|
||||||
): Boolean {
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
addLayer(layer, NIMapView.LAYER_GROUPS.OPERATE_MARKER)
|
addLayer(layer, NIMapView.LAYER_GROUPS.OPERATE_MARKER)
|
||||||
layer
|
layer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private val markerRendererFactory: MarkerRendererFactory by lazy {
|
|
||||||
val bitmapPoi: Bitmap = AndroidBitmap(
|
|
||||||
BitmapFactory.decodeResource(
|
|
||||||
mContext.resources,
|
|
||||||
R.mipmap.map_icon_blue2
|
|
||||||
)
|
|
||||||
)
|
|
||||||
val symbol = MarkerSymbol(bitmapPoi, MarkerSymbol.HotspotPlace.BOTTOM_CENTER)
|
|
||||||
MarkerRendererFactory { markerLayer ->
|
|
||||||
object : ClusterMarkerRenderer(
|
|
||||||
mContext,
|
|
||||||
markerLayer,
|
|
||||||
symbol,
|
|
||||||
ClusterStyle(
|
|
||||||
org.oscim.backend.canvas.Color.WHITE,
|
|
||||||
org.oscim.backend.canvas.Color.BLUE
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private val resId = R.mipmap.map_icon_report
|
private val resId = R.mipmap.map_icon_report
|
||||||
private val noteResId = R.drawable.icon_note_marker
|
private val noteResId = R.drawable.icon_note_marker
|
||||||
private var itemListener: OnQsRecordItemClickListener? = null
|
private var itemListener: OnQsRecordItemClickListener? = null
|
||||||
@ -436,26 +405,6 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 初始话质检数据图层
|
|
||||||
// */
|
|
||||||
// private fun initQsRecordDataLayer() {
|
|
||||||
//
|
|
||||||
// mContext.lifecycleScope.launch(Dispatchers.IO) {
|
|
||||||
// var list = mutableListOf<QsRecordBean>()
|
|
||||||
// val realm = Realm.getDefaultInstance()
|
|
||||||
// realm.executeTransaction {
|
|
||||||
// val objects = realm.where<QsRecordBean>().findAll()
|
|
||||||
// list = realm.copyFromRealm(objects)
|
|
||||||
// }
|
|
||||||
// for (item in list) {
|
|
||||||
// createMarkerItem(item)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加质检数据marker
|
* 添加质检数据marker
|
||||||
*/
|
*/
|
||||||
@ -808,6 +757,6 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
|||||||
|
|
||||||
interface OnQsRecordItemClickListener {
|
interface OnQsRecordItemClickListener {
|
||||||
fun onQsRecordList(list: MutableList<String>)
|
fun onQsRecordList(list: MutableList<String>)
|
||||||
fun onNoteList(list: MutableList<String>)
|
fun onNote(noteId: String)
|
||||||
fun onNiLocation(it: NiLocation)
|
fun onNiLocation(it: NiLocation)
|
||||||
}
|
}
|
||||||
|
2
vtm
2
vtm
@ -1 +1 @@
|
|||||||
Subproject commit dd13e533c38b5738ab404c2737d7ccadeff01323
|
Subproject commit 1ee201a41f78f169873848209a3f3bdac36f185a
|
Loading…
x
Reference in New Issue
Block a user