fix: 修改道路面的渲染
This commit is contained in:
@@ -12,8 +12,8 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.navinfo.omqs"
|
||||
minSdk 26
|
||||
targetSdk 32
|
||||
minSdk 21
|
||||
targetSdk 21
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.navinfo.omqs.bean
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass
|
||||
open class HadLinkDvoBean @JvmOverloads constructor(
|
||||
/**
|
||||
* 图幅号
|
||||
|
||||
@@ -9,7 +9,6 @@ import io.realm.annotations.Ignore
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass
|
||||
open class TaskBean @JvmOverloads constructor(
|
||||
/**
|
||||
* 测评任务id
|
||||
|
||||
@@ -136,13 +136,13 @@ class ImportOMDBHelper @AssistedInject constructor(
|
||||
it.name == currentConfig.table
|
||||
}
|
||||
|
||||
val listResult = mutableListOf<Map<String, Any?>>()
|
||||
val listResult = mutableListOf<Map<String, Any>>()
|
||||
currentConfig?.let {
|
||||
val list = FileIOUtils.readFile2List(txtFile, "UTF-8")
|
||||
if (list != null) {
|
||||
// 将list数据转换为map
|
||||
for (line in list) {
|
||||
val map = gson.fromJson<Map<String, Any?>>(line, object:TypeToken<Map<String, Any?>>(){}.getType())
|
||||
val map = gson.fromJson<Map<String, Any>>(line, object:TypeToken<Map<String, Any>>(){}.getType())
|
||||
.toMutableMap()
|
||||
map["qi_table"] = currentConfig.table
|
||||
map["qi_name"] = currentConfig.name
|
||||
@@ -162,13 +162,13 @@ class ImportOMDBHelper @AssistedInject constructor(
|
||||
renderEntity.geometry = map["geometry"].toString()
|
||||
for ((key, value) in map) {
|
||||
when (value) {
|
||||
is String -> renderEntity.properties[key.toString()] = value
|
||||
is Int -> renderEntity.properties[key.toString()] = value.toInt().toString()
|
||||
is Double -> renderEntity.properties[key.toString()] = value.toDouble().toString()
|
||||
else -> renderEntity.properties[key.toString()] = value.toString()
|
||||
is String -> renderEntity.properties.put(key, value)
|
||||
is Int -> renderEntity.properties.put(key, value.toInt().toString())
|
||||
is Double -> renderEntity.properties.put(key, value.toDouble().toString())
|
||||
else -> renderEntity.properties.put(key, value.toString())
|
||||
}
|
||||
}
|
||||
Realm.getDefaultInstance().insert(renderEntity)
|
||||
Realm.getDefaultInstance().copyToRealm(renderEntity)
|
||||
}
|
||||
// 1个文件发送一次flow流
|
||||
emit("${index + 1}/${importConfig.tables.size}")
|
||||
|
||||
@@ -120,9 +120,7 @@ class MainViewModel @Inject constructor(
|
||||
}
|
||||
|
||||
TraceDataBase.getDatabase(context, Constant.USER_DATA_PATH + "/trace.sqlite").niLocationDao.insert(niLocation)
|
||||
if (niLocationList.isNotEmpty()) {
|
||||
niLocationList.remove(niLocation)
|
||||
}
|
||||
niLocationList.remove(niLocation)
|
||||
|
||||
Log.e("qj", "saveTrace==${niLocationList.size}")
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ class PersonalCenterFragment : BaseFragment(), FSAFActivityCallbacks {
|
||||
R.id.personal_center_menu_test -> {
|
||||
viewModel.readRealmData()
|
||||
// 定位到指定位置
|
||||
niMapController.mMapView.vtmMap.animator().animateTo(GeoPoint(30.270367985798032, 113.83513667119433))
|
||||
niMapController.mMapView.vtmMap.animator().animateTo(GeoPoint(30.226256855699773, 113.84660523913344))
|
||||
}
|
||||
R.id.personal_center_menu_task_list -> {
|
||||
findNavController().navigate(R.id.TaskListFragment)
|
||||
|
||||
Reference in New Issue
Block a user