Merge branch 'master' of gitlab.navinfo.com:CollectVehicle/OneMapQS
Conflicts: app/src/main/java/com/navinfo/omqs/db/RealmOperateHelper.kt app/src/main/java/com/navinfo/omqs/ui/activity/map/MainActivity.kt app/src/main/java/com/navinfo/omqs/ui/activity/map/MainViewModel.kt vtm
This commit is contained in:
@@ -59,7 +59,6 @@
|
|||||||
android:name=".ui.activity.login.LoginActivity"
|
android:name=".ui.activity.login.LoginActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:launchMode="singleTask"
|
|
||||||
android:screenOrientation="landscape"
|
android:screenOrientation="landscape"
|
||||||
android:theme="@style/Theme.OMQualityInspection">
|
android:theme="@style/Theme.OMQualityInspection">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
|||||||
@@ -140,7 +140,6 @@
|
|||||||
"table": "OMDB_LANE_CONSTRUCTION",
|
"table": "OMDB_LANE_CONSTRUCTION",
|
||||||
"code": 2090,
|
"code": 2090,
|
||||||
"name": "车道施工",
|
"name": "车道施工",
|
||||||
"checkLinkId": false,
|
|
||||||
"existSubCode": true,
|
"existSubCode": true,
|
||||||
"catch":true,
|
"catch":true,
|
||||||
"zoomMin": 18,
|
"zoomMin": 18,
|
||||||
@@ -150,7 +149,6 @@
|
|||||||
"table": "OMDB_BRIDGE",
|
"table": "OMDB_BRIDGE",
|
||||||
"code": 2201,
|
"code": 2201,
|
||||||
"name": "桥",
|
"name": "桥",
|
||||||
"checkLinkId": false,
|
|
||||||
"zoomMin": 15,
|
"zoomMin": 15,
|
||||||
"zoomMax": 20,
|
"zoomMax": 20,
|
||||||
"transformer": [
|
"transformer": [
|
||||||
@@ -166,7 +164,6 @@
|
|||||||
"table": "OMDB_TUNNEL",
|
"table": "OMDB_TUNNEL",
|
||||||
"code": 2202,
|
"code": 2202,
|
||||||
"name": "隧道",
|
"name": "隧道",
|
||||||
"checkLinkId": false,
|
|
||||||
"zoomMin": 15,
|
"zoomMin": 15,
|
||||||
"zoomMax": 20,
|
"zoomMax": 20,
|
||||||
"transformer": [
|
"transformer": [
|
||||||
@@ -226,12 +223,7 @@
|
|||||||
"k": "geometry",
|
"k": "geometry",
|
||||||
"v": "~",
|
"v": "~",
|
||||||
"klib": "geometry",
|
"klib": "geometry",
|
||||||
"vlib": "normalizationTrafficSignHeight()"
|
"vlib": "obtainTrafficSignCenterPoint()"
|
||||||
},{
|
|
||||||
"k": "geometry",
|
|
||||||
"v": "~",
|
|
||||||
"klib": "geometry",
|
|
||||||
"vlib": "generateDirectReferenceLine('', 0.2)"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -300,6 +292,7 @@
|
|||||||
"table": "OMDB_SPEEDLIMIT",
|
"table": "OMDB_SPEEDLIMIT",
|
||||||
"code": 4002,
|
"code": 4002,
|
||||||
"name": "常规点限速",
|
"name": "常规点限速",
|
||||||
|
"catch":true,
|
||||||
"zoomMin": 15,
|
"zoomMin": 15,
|
||||||
"zoomMax": 20,
|
"zoomMax": 20,
|
||||||
"transformer": [
|
"transformer": [
|
||||||
@@ -404,6 +397,7 @@
|
|||||||
"table": "OMDB_WARNINGSIGN",
|
"table": "OMDB_WARNINGSIGN",
|
||||||
"code": 4009,
|
"code": 4009,
|
||||||
"name": "警示信息",
|
"name": "警示信息",
|
||||||
|
"catch":true,
|
||||||
"zoomMin": 15,
|
"zoomMin": 15,
|
||||||
"zoomMax": 20,
|
"zoomMax": 20,
|
||||||
"transformer": [
|
"transformer": [
|
||||||
@@ -437,6 +431,7 @@
|
|||||||
"table": "OMDB_ELECTRONICEYE",
|
"table": "OMDB_ELECTRONICEYE",
|
||||||
"code": 4010,
|
"code": 4010,
|
||||||
"name": "电子眼",
|
"name": "电子眼",
|
||||||
|
"catch":true,
|
||||||
"zoomMin": 15,
|
"zoomMin": 15,
|
||||||
"zoomMax": 20,
|
"zoomMax": 20,
|
||||||
"transformer": [
|
"transformer": [
|
||||||
@@ -470,6 +465,7 @@
|
|||||||
"table": "OMDB_TRAFFICLIGHT",
|
"table": "OMDB_TRAFFICLIGHT",
|
||||||
"code": 4022,
|
"code": 4022,
|
||||||
"name": "交通灯",
|
"name": "交通灯",
|
||||||
|
"catch":true,
|
||||||
"zoomMin": 15,
|
"zoomMin": 15,
|
||||||
"zoomMax": 20,
|
"zoomMax": 20,
|
||||||
"transformer": [
|
"transformer": [
|
||||||
@@ -479,6 +475,7 @@
|
|||||||
"table": "OMDB_TOLLGATE",
|
"table": "OMDB_TOLLGATE",
|
||||||
"code": 4023,
|
"code": 4023,
|
||||||
"name": "收费站",
|
"name": "收费站",
|
||||||
|
"catch":true,
|
||||||
"zoomMin": 15,
|
"zoomMin": 15,
|
||||||
"zoomMax": 20,
|
"zoomMax": 20,
|
||||||
"transformer": [
|
"transformer": [
|
||||||
@@ -488,6 +485,7 @@
|
|||||||
"table": "OMDB_LANEINFO",
|
"table": "OMDB_LANEINFO",
|
||||||
"code": 4601,
|
"code": 4601,
|
||||||
"name": "车信",
|
"name": "车信",
|
||||||
|
"catch":true,
|
||||||
"zoomMin": 15,
|
"zoomMin": 15,
|
||||||
"zoomMax": 17,
|
"zoomMax": 17,
|
||||||
"transformer": [
|
"transformer": [
|
||||||
|
|||||||
@@ -30,6 +30,9 @@ import kotlinx.coroutines.flow.Flow
|
|||||||
import kotlinx.coroutines.flow.flow
|
import kotlinx.coroutines.flow.flow
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import org.locationtech.jts.geom.Geometry
|
import org.locationtech.jts.geom.Geometry
|
||||||
|
import org.locationtech.jts.geom.GeometryFactory
|
||||||
|
import org.locationtech.jts.geom.LineString
|
||||||
|
import org.locationtech.jts.geom.MultiLineString
|
||||||
import org.spatialite.database.SQLiteDatabase
|
import org.spatialite.database.SQLiteDatabase
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
@@ -183,15 +186,23 @@ class ImportOMDBHelper @AssistedInject constructor(
|
|||||||
tableNum += importConfig.tableMap.size
|
tableNum += importConfig.tableMap.size
|
||||||
}
|
}
|
||||||
//缓存任务link信息,便于下面与数据进行任务link匹配
|
//缓存任务link信息,便于下面与数据进行任务link匹配
|
||||||
val hashMap: HashMap<Long, HadLinkDvoBean> =
|
val hashMap: HashMap<Long, HadLinkDvoBean> = HashMap<Long, HadLinkDvoBean>()
|
||||||
HashMap<Long, HadLinkDvoBean>() //define empty hashmap
|
|
||||||
|
val lineList = arrayOfNulls<LineString>(task.hadLinkDvoList.size)
|
||||||
|
var index = 0
|
||||||
task.hadLinkDvoList.forEach {
|
task.hadLinkDvoList.forEach {
|
||||||
hashMap[it.linkPid.toLong()] = it;
|
hashMap[it.linkPid.toLong()] = it
|
||||||
|
lineList[index] = GeometryTools.createGeometry(it.geometry) as LineString
|
||||||
|
index++
|
||||||
}
|
}
|
||||||
|
|
||||||
val resHashMap: HashMap<String, RenderEntity> =
|
val resHashMap: HashMap<String, RenderEntity> =
|
||||||
HashMap<String, RenderEntity>() //define empty hashmap
|
HashMap<String, RenderEntity>() //define empty hashmap
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
var multipLine = MultiLineString(lineList, GeometryFactory())
|
||||||
|
|
||||||
|
|
||||||
// 遍历解压后的文件,读取该数据返回
|
// 遍历解压后的文件,读取该数据返回
|
||||||
Log.d("ImportOMDBHelper", "表解析===开始时间$dataImportTime===")
|
Log.d("ImportOMDBHelper", "表解析===开始时间$dataImportTime===")
|
||||||
|
|
||||||
@@ -249,7 +260,7 @@ class ImportOMDBHelper @AssistedInject constructor(
|
|||||||
renderEntity.geometry = map["geometry"].toString()
|
renderEntity.geometry = map["geometry"].toString()
|
||||||
Log.d("ImportOMDBHelper", "解析===1处理3D")
|
Log.d("ImportOMDBHelper", "解析===1处理3D")
|
||||||
// 其他数据插入到Properties中
|
// 其他数据插入到Properties中
|
||||||
if (!currentConfig.is3D) { // 如果是非3d要素,则自动将Z轴坐标全部置为0
|
/* if (!currentConfig.is3D) { // 如果是非3d要素,则自动将Z轴坐标全部置为0
|
||||||
val coordinates =
|
val coordinates =
|
||||||
renderEntity.wkt?.coordinates?.map { coordinate ->
|
renderEntity.wkt?.coordinates?.map { coordinate ->
|
||||||
coordinate.z = 0.0
|
coordinate.z = 0.0
|
||||||
@@ -271,7 +282,7 @@ class ImportOMDBHelper @AssistedInject constructor(
|
|||||||
if (newGeometry != null) {
|
if (newGeometry != null) {
|
||||||
renderEntity.geometry = newGeometry.toString()
|
renderEntity.geometry = newGeometry.toString()
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
Log.d("ImportOMDBHelper", "解析===2处理3D")
|
Log.d("ImportOMDBHelper", "解析===2处理3D")
|
||||||
Log.d("ImportOMDBHelper", "解析===1处理属性")
|
Log.d("ImportOMDBHelper", "解析===1处理属性")
|
||||||
for ((key, value) in map) {
|
for ((key, value) in map) {
|
||||||
@@ -391,6 +402,7 @@ class ImportOMDBHelper @AssistedInject constructor(
|
|||||||
|
|
||||||
Log.d("ImportOMDBHelper", "解析===2处理杆状物")
|
Log.d("ImportOMDBHelper", "解析===2处理杆状物")
|
||||||
Log.d("ImportOMDBHelper", "解析===1任务路线匹配")
|
Log.d("ImportOMDBHelper", "解析===1任务路线匹配")
|
||||||
|
|
||||||
//遍历判断只显示与任务Link相关的任务数据
|
//遍历判断只显示与任务Link相关的任务数据
|
||||||
if (currentConfig.checkLinkId) {
|
if (currentConfig.checkLinkId) {
|
||||||
|
|
||||||
@@ -484,7 +496,19 @@ class ImportOMDBHelper @AssistedInject constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
renderEntity.enable = 2
|
renderEntity.enable = 1
|
||||||
|
|
||||||
|
/* var geometry = GeometryTools.createGeometry(renderEntity.geometry)
|
||||||
|
if(multipLine.intersects(geometry)){
|
||||||
|
renderEntity.enable = 1
|
||||||
|
}else{
|
||||||
|
val dis = multipLine.distance(GeometryTools.createGeometry(renderEntity.geometry))
|
||||||
|
if(dis>36){
|
||||||
|
continue
|
||||||
|
}else{
|
||||||
|
renderEntity.enable = 1
|
||||||
|
}
|
||||||
|
}*/
|
||||||
Log.e("qj", "${renderEntity.name}==不包括任务linkPid")
|
Log.e("qj", "${renderEntity.name}==不包括任务linkPid")
|
||||||
}
|
}
|
||||||
Log.d("ImportOMDBHelper", "解析===2任务路线匹配")
|
Log.d("ImportOMDBHelper", "解析===2任务路线匹配")
|
||||||
|
|||||||
@@ -815,4 +815,40 @@ class ImportPreProcess {
|
|||||||
val code = renderEntity.properties[codeName]
|
val code = renderEntity.properties[codeName]
|
||||||
renderEntity.properties["src"] = "${prefix}${code}${suffix}"
|
renderEntity.properties["src"] = "${prefix}${code}${suffix}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前数据的中心点坐标
|
||||||
|
* */
|
||||||
|
fun obtainTrafficSignCenterPoint(renderEntity: RenderEntity) {
|
||||||
|
// 获取中心坐标点,将中心坐标作为数据的新的geometry位置
|
||||||
|
val centerPoint = renderEntity.wkt?.centroid
|
||||||
|
// 根据heading方向自动生成新的Geometry
|
||||||
|
var radian = 0.0
|
||||||
|
val pointStart = Coordinate(centerPoint!!.x, centerPoint.y)
|
||||||
|
var angle =
|
||||||
|
if (renderEntity?.properties?.get("heading") == null) 0.0 else renderEntity?.properties?.get(
|
||||||
|
"heading"
|
||||||
|
)?.toDouble()!!
|
||||||
|
// angle角度为与正北方向的顺时针夹角,将其转换为与X轴正方向的逆时针夹角,即为正东方向的夹角
|
||||||
|
angle = ((450 - angle) % 360)
|
||||||
|
radian = Math.toRadians(angle)
|
||||||
|
|
||||||
|
// 计算偏移距离
|
||||||
|
var dx: Double = GeometryTools.convertDistanceToDegree(
|
||||||
|
defaultTranslateDistance,
|
||||||
|
centerPoint.y
|
||||||
|
) * Math.cos(radian)
|
||||||
|
var dy: Double = GeometryTools.convertDistanceToDegree(
|
||||||
|
defaultTranslateDistance,
|
||||||
|
centerPoint.y
|
||||||
|
) * Math.sin(radian)
|
||||||
|
val listResult = mutableListOf<ReferenceEntity>()
|
||||||
|
|
||||||
|
val coorEnd = Coordinate(pointStart.getX() + dx, pointStart.getY() + dy, pointStart.z)
|
||||||
|
renderEntity.geometry =
|
||||||
|
WKTWriter(3).write(GeometryTools.createLineString(arrayOf(pointStart, coorEnd)))
|
||||||
|
|
||||||
|
val code = renderEntity.properties["signType"]
|
||||||
|
renderEntity.properties["src"] = "assets:omdb/appendix/1105_${code}_0.svg"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -65,7 +65,7 @@ class RealmOperateHelper() {
|
|||||||
val realm = getSelectTaskRealmInstance()
|
val realm = getSelectTaskRealmInstance()
|
||||||
val realmList =
|
val realmList =
|
||||||
getSelectTaskRealmTools(RenderEntity::class.java, false)
|
getSelectTaskRealmTools(RenderEntity::class.java, false)
|
||||||
.equalTo("table", "OMDB_RD_LINK")
|
.equalTo("table", "OMDB_RD_LINK_KIND")
|
||||||
.greaterThanOrEqualTo("tileX", xStart)
|
.greaterThanOrEqualTo("tileX", xStart)
|
||||||
.lessThanOrEqualTo("tileX", xEnd)
|
.lessThanOrEqualTo("tileX", xEnd)
|
||||||
.greaterThanOrEqualTo("tileY", yStart)
|
.greaterThanOrEqualTo("tileY", yStart)
|
||||||
@@ -74,6 +74,7 @@ class RealmOperateHelper() {
|
|||||||
// 将获取到的数据和查询的polygon做相交,只返回相交的数据
|
// 将获取到的数据和查询的polygon做相交,只返回相交的数据
|
||||||
val dataList = realm.copyFromRealm(realmList)
|
val dataList = realm.copyFromRealm(realmList)
|
||||||
realm.close()
|
realm.close()
|
||||||
|
|
||||||
val queryResult = dataList?.stream()?.filter {
|
val queryResult = dataList?.stream()?.filter {
|
||||||
polygon.intersects(it.wkt)
|
polygon.intersects(it.wkt)
|
||||||
}?.toList()
|
}?.toList()
|
||||||
@@ -200,7 +201,7 @@ class RealmOperateHelper() {
|
|||||||
var link: RenderEntity? = null
|
var link: RenderEntity? = null
|
||||||
val realm = getSelectTaskRealmInstance()
|
val realm = getSelectTaskRealmInstance()
|
||||||
val realmR =
|
val realmR =
|
||||||
realm.where(RenderEntity::class.java).equalTo("table", "OMDB_RD_LINK")
|
realm.where(RenderEntity::class.java).equalTo("table", "OMDB_RD_LINK_KIND")
|
||||||
.equalTo("properties['${LinkTable.linkPid}']", linkPid).findFirst()
|
.equalTo("properties['${LinkTable.linkPid}']", linkPid).findFirst()
|
||||||
if (realmR != null) {
|
if (realmR != null) {
|
||||||
link = realm.copyFromRealm(realmR)
|
link = realm.copyFromRealm(realmR)
|
||||||
@@ -330,7 +331,7 @@ class RealmOperateHelper() {
|
|||||||
val result = mutableListOf<RenderEntity>()
|
val result = mutableListOf<RenderEntity>()
|
||||||
val realm = getSelectTaskRealmInstance()
|
val realm = getSelectTaskRealmInstance()
|
||||||
val realmList = getSelectTaskRealmTools(RenderEntity::class.java, false)
|
val realmList = getSelectTaskRealmTools(RenderEntity::class.java, false)
|
||||||
.notEqualTo("table", DataCodeEnum.OMDB_RD_LINK.name)
|
.notEqualTo("table", DataCodeEnum.OMDB_RD_LINK_KIND.name)
|
||||||
.equalTo("properties['${LinkTable.linkPid}']", linkPid)
|
.equalTo("properties['${LinkTable.linkPid}']", linkPid)
|
||||||
.findAll()
|
.findAll()
|
||||||
result.addAll(realm.copyFromRealm(realmList))
|
result.addAll(realm.copyFromRealm(realmList))
|
||||||
@@ -478,5 +479,5 @@ enum class BUFFER_TYPE(val index: Int) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private val DEFAULT_BUFFER: Double = 15.0
|
private const val DEFAULT_BUFFER: Double = 15.0
|
||||||
private val DEFAULT_BUFFER_TYPE = BUFFER_TYPE.METER
|
private val DEFAULT_BUFFER_TYPE = BUFFER_TYPE.METER
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -470,7 +470,8 @@ class MainActivity : BaseActivity() {
|
|||||||
Toast.LENGTH_SHORT
|
Toast.LENGTH_SHORT
|
||||||
).show()
|
).show()
|
||||||
}
|
}
|
||||||
NaviStatus.NAVI_STATUS_DIRECTION_OFF -> TODO()
|
NaviStatus.NAVI_STATUS_DIRECTION_OFF -> {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -504,7 +505,8 @@ class MainActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
findNavController(R.id.main_activity_right_fragment).addOnDestinationChangedListener { _, destination, arguments ->
|
findNavController(R.id.main_activity_right_fragment).addOnDestinationChangedListener { _, destination, _ ->
|
||||||
|
backSignMoreInfo()
|
||||||
if (destination.id == R.id.RightEmptyFragment) {
|
if (destination.id == R.id.RightEmptyFragment) {
|
||||||
binding.mainActivityRightVisibilityButtonsGroup.visibility = View.VISIBLE
|
binding.mainActivityRightVisibilityButtonsGroup.visibility = View.VISIBLE
|
||||||
} else {
|
} else {
|
||||||
@@ -1185,6 +1187,7 @@ class MainActivity : BaseActivity() {
|
|||||||
* 打开道路名称属性看板,选择的道路在viewmodel里记录,不用
|
* 打开道路名称属性看板,选择的道路在viewmodel里记录,不用
|
||||||
*/
|
*/
|
||||||
fun openRoadNameFragment() {
|
fun openRoadNameFragment() {
|
||||||
|
backSignMoreInfo()
|
||||||
if (viewModel.liveDataRoadName.value != null) {
|
if (viewModel.liveDataRoadName.value != null) {
|
||||||
viewModel.showSignMoreInfo(viewModel.liveDataRoadName.value!!)
|
viewModel.showSignMoreInfo(viewModel.liveDataRoadName.value!!)
|
||||||
}
|
}
|
||||||
@@ -1212,10 +1215,18 @@ class MainActivity : BaseActivity() {
|
|||||||
rightController.navigate(R.id.TaskLinkFragment)
|
rightController.navigate(R.id.TaskLinkFragment)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 右侧按钮+经纬度按钮
|
|
||||||
*/
|
|
||||||
fun setRightButtonsVisible(visible: Int) {
|
fun setRightButtonsVisible(visible: Int) {
|
||||||
binding.mainActivityRightVisibilityButtonsGroup2.visibility = visible
|
binding.mainActivityRightVisibilityButtonsGroup2.visibility = visible
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 隐藏更多信息面板
|
||||||
|
*/
|
||||||
|
fun backSignMoreInfo(){
|
||||||
|
val fragment =
|
||||||
|
supportFragmentManager.findFragmentById(R.id.main_activity_sign_more_info_fragment)
|
||||||
|
if(fragment!=null&&!fragment.isHidden){
|
||||||
|
supportFragmentManager.beginTransaction().remove(fragment).commit()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -583,7 +583,7 @@ class MainViewModel @Inject constructor(
|
|||||||
GeometryTools.createPoint(
|
GeometryTools.createPoint(
|
||||||
point.longitude, point.latitude
|
point.longitude, point.latitude
|
||||||
),
|
),
|
||||||
buffer = 2.4, catchAll = false,
|
buffer = 3.2, catchAll = false,
|
||||||
)
|
)
|
||||||
//增加道路线过滤原则
|
//增加道路线过滤原则
|
||||||
val filterResult = itemList.filter {
|
val filterResult = itemList.filter {
|
||||||
@@ -719,12 +719,6 @@ class MainViewModel @Inject constructor(
|
|||||||
|
|
||||||
val linkList = realmOperateHelper.queryLink(point = point)
|
val linkList = realmOperateHelper.queryLink(point = point)
|
||||||
|
|
||||||
/* val linkList = realmOperateHelper.queryLine(
|
|
||||||
point = point,
|
|
||||||
buffer = 1.0,
|
|
||||||
table = "OMDB_RD_LINK_KIND"
|
|
||||||
)*/
|
|
||||||
|
|
||||||
var hisRoadName = false
|
var hisRoadName = false
|
||||||
|
|
||||||
if (linkList.isNotEmpty()) {
|
if (linkList.isNotEmpty()) {
|
||||||
@@ -830,13 +824,16 @@ class MainViewModel @Inject constructor(
|
|||||||
val outList = entityList.distinct()
|
val outList = entityList.distinct()
|
||||||
for (i in outList.indices) {
|
for (i in outList.indices) {
|
||||||
val outLink = outList[i].properties["linkOut"]
|
val outLink = outList[i].properties["linkOut"]
|
||||||
val linkOutEntity = realmOperateHelper.getSelectTaskRealmTools(
|
val linkOutEntity =
|
||||||
RenderEntity::class.java, true
|
realmOperateHelper.getSelectTaskRealmTools(
|
||||||
).equalTo("table", DataCodeEnum.OMDB_RD_LINK.name).and()
|
RenderEntity::class.java,
|
||||||
.equalTo(
|
true
|
||||||
"properties['${RenderEntity.Companion.LinkTable.linkPid}']",
|
)
|
||||||
outLink
|
.equalTo("table", DataCodeEnum.OMDB_RD_LINK_KIND.name).and()
|
||||||
).findFirst()
|
.equalTo(
|
||||||
|
"properties['${RenderEntity.Companion.LinkTable.linkPid}']",
|
||||||
|
outLink
|
||||||
|
).findFirst()
|
||||||
if (linkOutEntity != null) {
|
if (linkOutEntity != null) {
|
||||||
mapController.lineHandler.linksLayer.addLine(
|
mapController.lineHandler.linksLayer.addLine(
|
||||||
linkOutEntity.geometry, 0x7DFF0000
|
linkOutEntity.geometry, 0x7DFF0000
|
||||||
@@ -893,7 +890,6 @@ class MainViewModel @Inject constructor(
|
|||||||
fun onClickMenu() {
|
fun onClickMenu() {
|
||||||
menuState = !menuState
|
menuState = !menuState
|
||||||
liveDataMenuState.postValue(menuState)
|
liveDataMenuState.postValue(menuState)
|
||||||
// naviEngine!!.bindingRoute(null, mapController.mMapView.vtmMap.mapPosition.geoPoint)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCleared() {
|
override fun onCleared() {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class TopSignAdapter(private var itemListener: ((Int, SignBean) -> Unit?)? = nul
|
|||||||
DataCodeEnum.OMDB_TUNNEL.code,
|
DataCodeEnum.OMDB_TUNNEL.code,
|
||||||
DataCodeEnum.OMDB_ROUNDABOUT.code,
|
DataCodeEnum.OMDB_ROUNDABOUT.code,
|
||||||
DataCodeEnum.OMDB_VIADUCT.code,
|
DataCodeEnum.OMDB_VIADUCT.code,
|
||||||
-> bd.topSignName.text = ""
|
-> bd.topSignName.text = "形态"
|
||||||
else -> bd.topSignName.text = item.name
|
else -> bd.topSignName.text = item.name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ class PersonalCenterFragment(private var indoorDataListener: ((Boolean) -> Unit?
|
|||||||
// 定位到指定位置
|
// 定位到指定位置
|
||||||
niMapController.mMapView.vtmMap.animator()
|
niMapController.mMapView.vtmMap.animator()
|
||||||
// .animateTo(GeoPoint( 40.05108004733645, 116.29187746293708 ))
|
// .animateTo(GeoPoint( 40.05108004733645, 116.29187746293708 ))
|
||||||
.animateTo(GeoPoint(40.51850916836801, 115.78801387178642))
|
.animateTo(GeoPoint(40.09848700000006, 116.53088699999999))
|
||||||
}
|
}
|
||||||
|
|
||||||
R.id.personal_center_menu_open_all_layer -> {
|
R.id.personal_center_menu_open_all_layer -> {
|
||||||
|
|||||||
@@ -353,6 +353,10 @@ class TaskListAdapter(
|
|||||||
refreshData(list)
|
refreshData(list)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getSelectTaskPosition():Int{
|
||||||
|
return selectPosition
|
||||||
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
object ItemClickStatus {
|
object ItemClickStatus {
|
||||||
const val ITEM_LAYOUT_CLICK = 0 //条目点击
|
const val ITEM_LAYOUT_CLICK = 0 //条目点击
|
||||||
|
|||||||
@@ -126,6 +126,12 @@ class TaskListFragment : BaseFragment() {
|
|||||||
viewModel.liveDataTaskList.observe(viewLifecycleOwner) {
|
viewModel.liveDataTaskList.observe(viewLifecycleOwner) {
|
||||||
loadFinish()
|
loadFinish()
|
||||||
adapter.initSelectTask(it, viewModel.currentSelectTaskBean?.id)
|
adapter.initSelectTask(it, viewModel.currentSelectTaskBean?.id)
|
||||||
|
var position = adapter.getSelectTaskPosition()
|
||||||
|
if(position<0){
|
||||||
|
position = 0
|
||||||
|
}
|
||||||
|
//定位到被选中的任务
|
||||||
|
binding.taskListRecyclerview.smoothScrollToPosition(position)
|
||||||
}
|
}
|
||||||
|
|
||||||
//监听并调用上传
|
//监听并调用上传
|
||||||
|
|||||||
@@ -235,6 +235,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/shape_road_name_bg"
|
android:background="@drawable/shape_road_name_bg"
|
||||||
|
android:visibility="gone"
|
||||||
android:onClick="@{()->mainActivity.openRoadNameFragment()}"
|
android:onClick="@{()->mainActivity.openRoadNameFragment()}"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
@@ -543,7 +544,6 @@
|
|||||||
android:id="@+id/main_activity_bottom_sheet_group"
|
android:id="@+id/main_activity_bottom_sheet_group"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:visibility="gone"
|
|
||||||
app:constraint_referenced_ids="
|
app:constraint_referenced_ids="
|
||||||
main_bottom_route_text,
|
main_bottom_route_text,
|
||||||
main_bottom_offline_map_text,
|
main_bottom_offline_map_text,
|
||||||
@@ -551,7 +551,7 @@
|
|||||||
main_bottom_task_text,main_bottom_route,
|
main_bottom_task_text,main_bottom_route,
|
||||||
main_bottom_offline_map,
|
main_bottom_offline_map,
|
||||||
main_bottom_res,
|
main_bottom_res,
|
||||||
main_activity_bottom_sheet_bg,
|
main_activity_bottom_sheet_bg,
|
||||||
main_bottom_task,main_bottom_home" />
|
main_bottom_task,main_bottom_home" />
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,7 @@
|
|||||||
style="@style/content_font_default"
|
style="@style/content_font_default"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:textIsSelectable="true"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:paddingBottom="@dimen/twenty_two"
|
android:paddingBottom="@dimen/twenty_two"
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
<item
|
<item
|
||||||
android:id="@+id/personal_center_menu_version"
|
android:id="@+id/personal_center_menu_version"
|
||||||
android:icon="@drawable/ic_baseline_layers_24"
|
android:icon="@drawable/ic_baseline_layers_24"
|
||||||
android:title="版本:23QE4_V1.5.0_20230912_A" />
|
android:title="版本:23QE4_V1.5.2_20230919_A" />
|
||||||
</group>
|
</group>
|
||||||
<group android:checkableBehavior="single">
|
<group android:checkableBehavior="single">
|
||||||
<item android:title="小标题">
|
<item android:title="小标题">
|
||||||
|
|||||||
@@ -1566,12 +1566,10 @@
|
|||||||
</m>
|
</m>
|
||||||
|
|
||||||
<!-- 交通标牌 -->
|
<!-- 交通标牌 -->
|
||||||
<!-- <m v="OMDB_TRAFFIC_SIGN">-->
|
<m v="OMDB_TRAFFIC_SIGN">
|
||||||
<!-- <area use="sign-bg" repeat="false" stroke="#ff0000" stroke-width="2"></area>-->
|
<symbol repeat="false" repeat-gap="2000" repeat-start="0" rotate="true"
|
||||||
<!-- <m k="type" v="angle">-->
|
src="@src" symbol-height="24" symbol-width="24" degree="-90"></symbol>
|
||||||
<!-- <line stroke="#00ff00" width="0.1"></line>-->
|
</m>
|
||||||
<!-- </m>-->
|
|
||||||
<!-- </m>-->
|
|
||||||
|
|
||||||
<m v="OMDB_AREA">
|
<m v="OMDB_AREA">
|
||||||
<!-- <area use="sign-bg" repeat="false" src="assets:omdb/veer_side_walk.jpg" stroke="#ff0000" stroke-width="2"></area>
|
<!-- <area use="sign-bg" repeat="false" src="assets:omdb/veer_side_walk.jpg" stroke="#ff0000" stroke-width="2"></area>
|
||||||
@@ -1598,7 +1596,7 @@
|
|||||||
</m>
|
</m>
|
||||||
|
|
||||||
<!-- 检查点 -->
|
<!-- 检查点 -->
|
||||||
<m v="OMDB_NODE_FORM">
|
<m v="OMDB_CHECKPOINT">
|
||||||
<symbol src="assets:omdb/icon_1012_0.svg" symbol-height="56"
|
<symbol src="assets:omdb/icon_1012_0.svg" symbol-height="56"
|
||||||
symbol-width="56"></symbol>
|
symbol-width="56"></symbol>
|
||||||
</m>
|
</m>
|
||||||
@@ -1703,7 +1701,7 @@
|
|||||||
</m>
|
</m>
|
||||||
<!--路牙-->
|
<!--路牙-->
|
||||||
<m k="boundaryType" v="3">
|
<m k="boundaryType" v="3">
|
||||||
<symbol repeat="true" repeat-gap="4" repeat-start="0" src="assets:omdb/icon_2013_3.svg" symbol-width="10" symbol-height="8"></symbol>
|
<symbol repeat="true" repeat-gap="10" repeat-start="0" src="assets:omdb/icon_2013_3.svg" symbol-width="16" symbol-height="10"></symbol>
|
||||||
</m>
|
</m>
|
||||||
<m k="boundaryType" v="5|7">
|
<m k="boundaryType" v="5|7">
|
||||||
<line stroke="#ffffff" use="boundaryType" />
|
<line stroke="#ffffff" use="boundaryType" />
|
||||||
@@ -1774,7 +1772,7 @@
|
|||||||
</m>
|
</m>
|
||||||
<m k="type" v="e_2_p">
|
<m k="type" v="e_2_p">
|
||||||
<symbol repeat="false" repeat-start="0" rotate="false" gland="true"
|
<symbol repeat="false" repeat-start="0" rotate="false" gland="true"
|
||||||
src="assets:omdb/icon_2202_1.svg" symbol-height="24" symbol-width="24"></symbol>
|
src="assets:omdb/icon_2202_0.svg" symbol-height="24" symbol-width="24"></symbol>
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
@@ -1790,7 +1788,7 @@
|
|||||||
</m>
|
</m>
|
||||||
<m k="type" v="e_2_p_1">
|
<m k="type" v="e_2_p_1">
|
||||||
<symbol gland="true"
|
<symbol gland="true"
|
||||||
src="assets:omdb/icon_2201_1_2.svg" symbol-height="56" symbol-width="56"></symbol>
|
src="assets:omdb/icon_2201_1_1.svg" symbol-height="56" symbol-width="56"></symbol>
|
||||||
</m>
|
</m>
|
||||||
<m k="type" v="s_2_p_2">
|
<m k="type" v="s_2_p_2">
|
||||||
<symbol gland="true"
|
<symbol gland="true"
|
||||||
@@ -1798,7 +1796,7 @@
|
|||||||
</m>
|
</m>
|
||||||
<m k="type" v="e_2_p_2">
|
<m k="type" v="e_2_p_2">
|
||||||
<symbol gland="true"
|
<symbol gland="true"
|
||||||
src="assets:omdb/icon_2201_2_2.svg" symbol-height="56" symbol-width="56"></symbol>
|
src="assets:omdb/icon_2201_2_1.svg" symbol-height="56" symbol-width="56"></symbol>
|
||||||
</m>
|
</m>
|
||||||
<m k="type" v="s_2_p_3">
|
<m k="type" v="s_2_p_3">
|
||||||
<symbol gland="true"
|
<symbol gland="true"
|
||||||
@@ -1806,14 +1804,14 @@
|
|||||||
</m>
|
</m>
|
||||||
<m k="type" v="e_2_p_3">
|
<m k="type" v="e_2_p_3">
|
||||||
<symbol gland="true"
|
<symbol gland="true"
|
||||||
src="assets:omdb/icon_2201_3_2.svg" symbol-height="56" symbol-width="56"></symbol>
|
src="assets:omdb/icon_2201_3_1.svg" symbol-height="56" symbol-width="56"></symbol>
|
||||||
</m>
|
</m>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<!-- 环岛 -->
|
<!-- 环岛 -->
|
||||||
<m v="OMDB_ROUNDABOUT">
|
<m v="OMDB_ROUNDABOUT">
|
||||||
<line stroke="#fcba5a" width="0.5" />
|
<line stroke="#fcba5a" width="0.5" />
|
||||||
<symbol repeat="true" repeat-start="0" repeat-gap="32" src="assets:omdb/icon_2204_0.svg"></symbol>
|
<symbol repeat="false" repeat-start="0" gland="false" repeat-gap="32" src="assets:omdb/icon_2204_0.svg"></symbol>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<!-- 停止位置 -->
|
<!-- 停止位置 -->
|
||||||
@@ -1932,7 +1930,24 @@
|
|||||||
</m>
|
</m>
|
||||||
<!-- 文字 -->
|
<!-- 文字 -->
|
||||||
<m v="OMDB_OBJECT_TEXT">
|
<m v="OMDB_OBJECT_TEXT">
|
||||||
<area use="obj-area" stroke="#00000000" repeat="false" src="@text-src:textString" longEdge="t" hasDirect="true"></area>
|
<m k="color" v="0">
|
||||||
|
<area use="obj-area" stroke="#00000000" fill="#dfe4ea" repeat="false" src="@text-src:textString" longEdge="t" hasDirect="true"></area>
|
||||||
|
</m>
|
||||||
|
<m k="color" v="1">
|
||||||
|
<area use="obj-area" stroke="#00000000" fill="#ffffff" repeat="false" src="@text-src:textString" longEdge="t" hasDirect="true"></area>
|
||||||
|
</m>
|
||||||
|
<m k="color" v="2">
|
||||||
|
<area use="obj-area" stroke="#00000000" fill="#ffff00" repeat="false" src="@text-src:textString" longEdge="t" hasDirect="true"></area>
|
||||||
|
</m>
|
||||||
|
<m k="color" v="3">
|
||||||
|
<area use="obj-area" stroke="#00000000" fill="#ff0000" repeat="false" src="@text-src:textString" longEdge="t" hasDirect="true"></area>
|
||||||
|
</m>
|
||||||
|
<m k="color" v="4">
|
||||||
|
<area use="obj-area" stroke="#00000000" fill="#00ff00" repeat="false" src="@text-src:textString" longEdge="t" hasDirect="true"></area>
|
||||||
|
</m>
|
||||||
|
<m k="color" v="9">
|
||||||
|
<area use="obj-area" stroke="#00000000" fill="#0000ff" repeat="false" src="@text-src:textString" longEdge="t" hasDirect="true"></area>
|
||||||
|
</m>
|
||||||
</m>
|
</m>
|
||||||
<!-- 符号 -->
|
<!-- 符号 -->
|
||||||
<m v="OMDB_OBJECT_SYMBOL">
|
<m v="OMDB_OBJECT_SYMBOL">
|
||||||
@@ -1955,7 +1970,7 @@
|
|||||||
|
|
||||||
<!-- 人行横道 -->
|
<!-- 人行横道 -->
|
||||||
<m v="OMDB_CROSS_WALK">
|
<m v="OMDB_CROSS_WALK">
|
||||||
<area use="obj-area" stroke="#00000000" repeat="true" src="assets:omdb/object_crosswalk_3014.svg" longEdge="s"></area>
|
<area use="obj-area" stroke="#ffffff" repeat="true" src="assets:omdb/object_crosswalk_3014.svg" longEdge="s"></area>
|
||||||
</m>
|
</m>
|
||||||
|
|
||||||
<!-- 箭头 -->
|
<!-- 箭头 -->
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 793 B After Width: | Height: | Size: 683 KiB |
28953
collect-library/src/main/assets/omdb/icon_2013_3_1.svg
Normal file
28953
collect-library/src/main/assets/omdb/icon_2013_3_1.svg
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 2.9 MiB |
@@ -262,7 +262,7 @@ public final class NIMapView extends RelativeLayout {
|
|||||||
|
|
||||||
// 增加比例尺图层
|
// 增加比例尺图层
|
||||||
NaviMapScaleBar naviMapScaleBar = new NaviMapScaleBar(getVtmMap());
|
NaviMapScaleBar naviMapScaleBar = new NaviMapScaleBar(getVtmMap());
|
||||||
mapScaleBarLayer = naviMapScaleBar.initScaleBarLayer(GLViewport.Position.BOTTOM_LEFT, 10, 0);
|
mapScaleBarLayer = naviMapScaleBar.initScaleBarLayer(GLViewport.Position.BOTTOM_LEFT, 256, 60);
|
||||||
|
|
||||||
// if (gridLayer == null) {
|
// if (gridLayer == null) {
|
||||||
// gridLayer = new TileGridLayer(getVtmMap());
|
// gridLayer = new TileGridLayer(getVtmMap());
|
||||||
|
|||||||
@@ -74,11 +74,11 @@ public class OMDBReferenceDataSource implements ITileDataSource {
|
|||||||
mThreadLocalDecoders.get().decode(tile.zoomLevel, tile, mapDataSink, listResult);
|
mThreadLocalDecoders.get().decode(tile.zoomLevel, tile, mapDataSink, listResult);
|
||||||
mapDataSink.completed(QueryResult.SUCCESS);
|
mapDataSink.completed(QueryResult.SUCCESS);
|
||||||
} else {
|
} else {
|
||||||
mapDataSink.completed(QueryResult.TILE_NOT_FOUND);
|
mapDataSink.completed(QueryResult.SUCCESS);
|
||||||
}
|
}
|
||||||
Realm.getInstance(MapParamUtils.getTaskConfig()).close();
|
Realm.getInstance(MapParamUtils.getTaskConfig()).close();
|
||||||
} else {
|
} else {
|
||||||
mapDataSink.completed(QueryResult.TILE_NOT_FOUND);
|
mapDataSink.completed(QueryResult.SUCCESS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,11 +72,11 @@ public class OMDBTileDataSource implements ITileDataSource {
|
|||||||
mThreadLocalDecoders.get().decode(tile.zoomLevel, tile, mapDataSink, listResult);
|
mThreadLocalDecoders.get().decode(tile.zoomLevel, tile, mapDataSink, listResult);
|
||||||
mapDataSink.completed(QueryResult.SUCCESS);
|
mapDataSink.completed(QueryResult.SUCCESS);
|
||||||
} else {
|
} else {
|
||||||
mapDataSink.completed(QueryResult.TILE_NOT_FOUND);
|
mapDataSink.completed(QueryResult.SUCCESS);
|
||||||
}
|
}
|
||||||
Realm.getInstance(MapParamUtils.getTaskConfig()).close();
|
Realm.getInstance(MapParamUtils.getTaskConfig()).close();
|
||||||
} else {
|
} else {
|
||||||
mapDataSink.completed(QueryResult.TILE_NOT_FOUND);
|
mapDataSink.completed(QueryResult.SUCCESS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user