增加评测link功能

This commit is contained in:
squallzhjch
2023-07-14 16:28:19 +08:00
parent be2d0389cf
commit 1412f7106a
22 changed files with 364 additions and 487 deletions

View File

@@ -150,6 +150,8 @@ class MainViewModel @Inject constructor(
//线选择状态
if (bSelectRoad) {
captureLink(it)
} else {
captureItem(it)
}
}
}
@@ -164,14 +166,12 @@ class MainViewModel @Inject constructor(
* 初始化选中的任务高亮高亮
*/
private suspend fun initTaskData() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
val id = sharedPreferences.getInt(Constant.SELECT_TASK_ID, -1)
val realm = Realm.getDefaultInstance()
val res = realm.where(TaskBean::class.java).equalTo("id", id).findFirst()
if (res != null) {
val taskBean = realm.copyFromRealm(res)
mapController.lineHandler.omdbTaskLinkLayer.addLineList(taskBean.hadLinkDvoList)
}
val id = sharedPreferences.getInt(Constant.SELECT_TASK_ID, -1)
val realm = Realm.getDefaultInstance()
val res = realm.where(TaskBean::class.java).equalTo("id", id).findFirst()
if (res != null) {
val taskBean = realm.copyFromRealm(res)
mapController.lineHandler.showTaskLines(taskBean.hadLinkDvoList)
}
}
@@ -252,6 +252,13 @@ class MainViewModel @Inject constructor(
}
/**
* 捕捉要素
*/
private suspend fun captureItem(point: GeoPoint) {
}
/**
* 捕获道路和面板
*/
@@ -516,10 +523,8 @@ class MainViewModel @Inject constructor(
bSelectRoad = select
//去掉缓存
linkIdCache = ""
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
mapController.lineHandler.removeLine()
liveDataSignList.value = mutableListOf()
}
mapController.lineHandler.removeLine()
liveDataSignList.value = mutableListOf()
}
/**