Merge branch 'master' of gitlab.navinfo.com:CollectVehicle/OneMapQS
Conflicts: app/src/main/assets/omdb_config.json app/src/main/java/com/navinfo/omqs/db/ImportOMDBHelper.kt app/src/main/java/com/navinfo/omqs/db/ImportPreProcess.kt
@@ -1558,7 +1558,11 @@
|
||||
<symbol repeat="false" repeat-start="0" repeat-gap="2000"
|
||||
src="@symbol" symbol-height="24" degree="90"></symbol>
|
||||
</m>
|
||||
|
||||
<!-- 车信CLM -->
|
||||
<m v="OMDB_CLM_LANEINFO" >
|
||||
<symbol repeat="false" repeat-start="0" repeat-gap="2000"
|
||||
src="@symbol" symbol-height="24" degree="90"></symbol>
|
||||
</m>
|
||||
<!-- 杆状物 -->
|
||||
<m v="OMDB_POLE">
|
||||
<symbol src="assets:omdb/icon_pole_3006.svg" symbol-height="56" symbol-width="56"></symbol>
|
||||
@@ -1720,22 +1724,22 @@
|
||||
<m k="markType" v="6">
|
||||
<!--其他|实线-->
|
||||
<m k="markColor" v="1">
|
||||
<symbol repeat="true" repeat-start="0" repeat-gap="24" src="assets:omdb/icon_2013_1.svg"/>
|
||||
<symbol repeat="true" repeat-start="0" repeat-gap="32" symbol-height="8" symbol-width="8" src="assets:omdb/icon_2013_1.svg"/>
|
||||
</m>
|
||||
<m k="markColor" v="2">
|
||||
<symbol repeat="true" repeat-start="0" repeat-gap="24" src="assets:omdb/icon_2013_2.svg"></symbol>
|
||||
<symbol repeat="true" repeat-start="0" repeat-gap="32" symbol-height="8" symbol-width="8" src="assets:omdb/icon_2013_2.svg"></symbol>
|
||||
</m>
|
||||
|
||||
<m k="markColor" v="6">
|
||||
<symbol repeat="true" repeat-start="0" repeat-gap="24" src="assets:omdb/icon_2013_6.svg"></symbol>
|
||||
<symbol repeat="true" repeat-start="0" repeat-gap="32" symbol-height="8" symbol-width="8" src="assets:omdb/icon_2013_6.svg"></symbol>
|
||||
</m>
|
||||
|
||||
<m k="markColor" v="7">
|
||||
<symbol repeat="true" repeat-start="0" repeat-gap="24" src="assets:omdb/icon_2013_7.svg"></symbol>
|
||||
<symbol repeat="true" repeat-start="0" repeat-gap="32" symbol-height="8" symbol-width="8" src="assets:omdb/icon_2013_7.svg"></symbol>
|
||||
</m>
|
||||
|
||||
<m k="markColor" v="0|9">
|
||||
<symbol repeat="true" repeat-start="0" repeat-gap="24" src="assets:omdb/icon_2013_0.svg"></symbol>
|
||||
<symbol repeat="true" repeat-start="0" repeat-gap="32" symbol-height="8" symbol-width="8" src="assets:omdb/icon_2013_0.svg"></symbol>
|
||||
</m>
|
||||
</m>
|
||||
</m>
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1695622778812" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="8830" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="48" height="48">
|
||||
<path
|
||||
d="M284.444444 227.555556h739.555556L739.555556 796.444444H0L284.444444 227.555556z m26.368 42.666666l-241.777777 483.555556h644.152889l241.777777-483.555556H310.812444z"
|
||||
fill="#8e44ad" p-id="8831"></path>
|
||||
<path d="M310.812444 270.222222l-241.777777 483.555556h644.152889l241.777777-483.555556z"
|
||||
fill="#8e44ad" fill-opacity=".99" p-id="8832"></path>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="b" xmlns="http://www.w3.org/2000/svg" width="136.1" height="113.4"
|
||||
viewBox="0 0 136.1 113.4">
|
||||
<g id="c">
|
||||
<g>
|
||||
<rect width="136.1" height="113.4" style="fill:none;" />
|
||||
<polygon points="109.7 56.7 0 56.7 26.4 0 136.1 0 109.7 56.7" style="fill:#8e44ad;" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 730 B After Width: | Height: | Size: 369 B |
@@ -1,11 +1,10 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1695622778812" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="8830" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="48" height="48">
|
||||
<path
|
||||
d="M284.444444 227.555556h739.555556L739.555556 796.444444H0L284.444444 227.555556z m26.368 42.666666l-241.777777 483.555556h644.152889l241.777777-483.555556H310.812444z"
|
||||
fill="#ffffff" p-id="8831"></path>
|
||||
<path d="M310.812444 270.222222l-241.777777 483.555556h644.152889l241.777777-483.555556z"
|
||||
fill="#ffffff" fill-opacity=".99" p-id="8832"></path>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="b" xmlns="http://www.w3.org/2000/svg" width="136.1" height="113.4"
|
||||
viewBox="0 0 136.1 113.4">
|
||||
<g id="c">
|
||||
<g>
|
||||
<rect width="136.1" height="113.4" style="fill:none;" />
|
||||
<polygon points="109.7 56.7 0 56.7 26.4 0 136.1 0 109.7 56.7" style="fill:#fff;" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 730 B After Width: | Height: | Size: 366 B |
@@ -1,11 +1,10 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1695622778812" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="8830" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="48" height="48">
|
||||
<path
|
||||
d="M284.444444 227.555556h739.555556L739.555556 796.444444H0L284.444444 227.555556z m26.368 42.666666l-241.777777 483.555556h644.152889l241.777777-483.555556H310.812444z"
|
||||
fill="#eccc68" p-id="8831"></path>
|
||||
<path d="M310.812444 270.222222l-241.777777 483.555556h644.152889l241.777777-483.555556z"
|
||||
fill="#eccc68" fill-opacity=".99" p-id="8832"></path>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="b" xmlns="http://www.w3.org/2000/svg" width="136.1" height="113.4"
|
||||
viewBox="0 0 136.1 113.4">
|
||||
<g id="c">
|
||||
<g>
|
||||
<rect width="136.1" height="113.4" style="fill:none;" />
|
||||
<polygon points="109.7 56.7 0 56.7 26.4 0 136.1 0 109.7 56.7" style="fill:#eccc68;" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 730 B After Width: | Height: | Size: 369 B |
@@ -1,11 +1,10 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1695622778812" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="8830" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="48" height="48">
|
||||
<path
|
||||
d="M284.444444 227.555556h739.555556L739.555556 796.444444H0L284.444444 227.555556z m26.368 42.666666l-241.777777 483.555556h644.152889l241.777777-483.555556H310.812444z"
|
||||
fill="#0000ff" p-id="8831"></path>
|
||||
<path d="M310.812444 270.222222l-241.777777 483.555556h644.152889l241.777777-483.555556z"
|
||||
fill="#0000ff" fill-opacity=".99" p-id="8832"></path>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="b" xmlns="http://www.w3.org/2000/svg" width="136.1" height="113.4"
|
||||
viewBox="0 0 136.1 113.4">
|
||||
<g id="c">
|
||||
<g>
|
||||
<rect width="136.1" height="113.4" style="fill:none;" />
|
||||
<polygon points="109.7 56.7 0 56.7 26.4 0 136.1 0 109.7 56.7" style="fill:#0000ff;" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 730 B After Width: | Height: | Size: 369 B |
@@ -1,11 +1,10 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1695622778812" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="8830" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="48" height="48">
|
||||
<path
|
||||
d="M284.444444 227.555556h739.555556L739.555556 796.444444H0L284.444444 227.555556z m26.368 42.666666l-241.777777 483.555556h644.152889l241.777777-483.555556H310.812444z"
|
||||
fill="#00ff00" p-id="8831"></path>
|
||||
<path d="M310.812444 270.222222l-241.777777 483.555556h644.152889l241.777777-483.555556z"
|
||||
fill="#00ff00" fill-opacity=".99" p-id="8832"></path>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="b" xmlns="http://www.w3.org/2000/svg" width="136.1" height="113.4"
|
||||
viewBox="0 0 136.1 113.4">
|
||||
<g id="c">
|
||||
<g>
|
||||
<rect width="136.1" height="113.4" style="fill:none;" />
|
||||
<polygon points="109.7 56.7 0 56.7 26.4 0 136.1 0 109.7 56.7" style="fill:#00ff00;" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 730 B After Width: | Height: | Size: 369 B |
@@ -1,5 +1,7 @@
|
||||
package com.navinfo.collect.library.data.entity
|
||||
|
||||
import com.navinfo.collect.library.utils.GeometryTools
|
||||
import com.navinfo.collect.library.utils.GeometryToolsKt
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.PrimaryKey
|
||||
|
||||
@@ -12,11 +14,13 @@ open class HadLinkDvoBean @JvmOverloads constructor(
|
||||
* 图幅号
|
||||
*/
|
||||
var mesh: String = "",
|
||||
|
||||
/**
|
||||
* linkPid
|
||||
*/
|
||||
@PrimaryKey
|
||||
var linkPid: String = "",
|
||||
|
||||
/**
|
||||
* (几何)加偏后
|
||||
*/
|
||||
@@ -31,10 +35,12 @@ open class HadLinkDvoBean @JvmOverloads constructor(
|
||||
* 1:源库link,2:选择link 3:现场新增
|
||||
*/
|
||||
var linkStatus: Int = 1,
|
||||
|
||||
/**
|
||||
* 详细属性
|
||||
*/
|
||||
var linkInfo: LinkInfoBean? = null,
|
||||
|
||||
/**
|
||||
* 长度(米)
|
||||
*/
|
||||
|
||||
@@ -81,6 +81,7 @@ enum class DataCodeEnum(var tableName: String, var code: String) {
|
||||
OMDB_TRAFFICLIGHT("交通灯", "4022"),
|
||||
OMDB_TOLLGATE("收费站", "4023"),
|
||||
OMDB_LANEINFO("车信", "4601"),
|
||||
OMDB_CLM_LANEINFO("车信CLM", "4602"),
|
||||
OMDB_LANE_LINK_LG("车道中心线", "5001");
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -608,6 +608,7 @@ public final class NIMapView extends RelativeLayout {
|
||||
LABEL(4)/*图标,文字图层*/,
|
||||
OPERATE_LINE(5)/*操作图层组*/,
|
||||
OPERATE_MARKER(6)/*操作图层组*/;
|
||||
|
||||
int groupIndex;
|
||||
|
||||
LAYER_GROUPS(int groupIndex) {
|
||||
|
||||
@@ -171,7 +171,7 @@ class LocationLayerHandler(context: AppCompatActivity, mapView: NIMapView) :
|
||||
mCurrentLocation?.run {
|
||||
val mapPosition = mMapView.vtmMap.mapPosition
|
||||
mapPosition.setPosition(this.latitude, this.longitude)
|
||||
mMapView.vtmMap.animator().animateTo(300, mapPosition)
|
||||
mMapView.vtmMap.animator().animateTo(800, mapPosition)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@ import org.oscim.backend.canvas.Paint
|
||||
import org.oscim.core.GeoPoint
|
||||
import org.oscim.layers.marker.*
|
||||
import org.oscim.layers.marker.ItemizedLayer.OnItemGestureListener
|
||||
import org.oscim.layers.tile.vector.VectorTileLayer
|
||||
import org.oscim.layers.vector.VectorLayer
|
||||
import org.oscim.layers.vector.geometries.*
|
||||
import org.oscim.map.Map
|
||||
import java.util.*
|
||||
@@ -43,8 +45,17 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
||||
*/
|
||||
private val mDefaultTextColor = "#4E55AF"
|
||||
|
||||
/**
|
||||
* 默认Marker可用状态
|
||||
*/
|
||||
private var markerEnable = true
|
||||
|
||||
/**
|
||||
* 默认轨迹可用状态
|
||||
*/
|
||||
private var traceMarkerEnable = true
|
||||
|
||||
|
||||
/**
|
||||
* 文字画笔
|
||||
*/
|
||||
@@ -179,6 +190,45 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
||||
layer
|
||||
}
|
||||
|
||||
/**
|
||||
* 评测精简数据marker 图层
|
||||
*/
|
||||
private val niLocationItemizedLayerSimple: ItemizedLayer by lazy {
|
||||
|
||||
val symbol = MarkerSymbol(niLocationBitmap, MarkerSymbol.HotspotPlace.CENTER)
|
||||
val layerSimple = ItemizedLayer(
|
||||
mapView.vtmMap,
|
||||
symbol,
|
||||
)
|
||||
layerSimple.setOnItemGestureListener(object : OnItemGestureListener<MarkerInterface> {
|
||||
override fun onItemSingleTapUp(index: Int, item: MarkerInterface?): Boolean {
|
||||
val tag = mMapView.listenerTagList.last()
|
||||
val listenerList = mMapView.listenerList[tag]
|
||||
if (listenerList != null) {
|
||||
for (listener in listenerList) {
|
||||
/* if (listener is OnNiLocationItemListener) {
|
||||
listener.onNiLocation(
|
||||
tag,
|
||||
index,
|
||||
(niLocationItemizedLayerSimple.itemList[index] as MarkerItem).uid as NiLocation
|
||||
)
|
||||
break
|
||||
}*/
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onItemLongPress(index: Int, item: MarkerInterface?): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
})
|
||||
addLayer(layerSimple, NIMapView.LAYER_GROUPS.OPERATE_MARKER)
|
||||
layerSimple
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 评测数据marker 图层
|
||||
*/
|
||||
@@ -213,7 +263,7 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
layer.isEnabled = false
|
||||
addLayer(layer, NIMapView.LAYER_GROUPS.OPERATE_MARKER)
|
||||
layer
|
||||
}
|
||||
@@ -277,13 +327,18 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
||||
// 设置矢量图层均在12级以上才显示
|
||||
mMapView.vtmMap.events.bind(Map.UpdateListener { e, mapPosition ->
|
||||
if (e == Map.SCALE_EVENT) {
|
||||
if(markerEnable){
|
||||
if (markerEnable) {
|
||||
qsRecordItemizedLayer.isEnabled = mapPosition.getZoomLevel() >= 12
|
||||
}else{
|
||||
} else {
|
||||
qsRecordItemizedLayer.isEnabled = false
|
||||
}
|
||||
|
||||
niLocationItemizedLayer.isEnabled = mapPosition.getZoomLevel() >= 12
|
||||
if (traceMarkerEnable) {
|
||||
niLocationItemizedLayer.isEnabled = mapPosition.getZoomLevel() in 17..20
|
||||
niLocationItemizedLayerSimple.isEnabled = mapPosition.getZoomLevel() in 12..16
|
||||
} else {
|
||||
niLocationItemizedLayer.isEnabled = false
|
||||
niLocationItemizedLayerSimple.isEnabled = false
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -379,13 +434,28 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
||||
mMapView.updateMap(true)
|
||||
}
|
||||
|
||||
fun setQsRecordMarkEnable(enable:Boolean){
|
||||
/**
|
||||
* Marker是否显示
|
||||
*/
|
||||
fun setQsRecordMarkEnable(enable: Boolean) {
|
||||
qsRecordItemizedLayer.isEnabled = enable
|
||||
markerEnable = enable
|
||||
qsRecordItemizedLayer.populate()
|
||||
mMapView.updateMap(true)
|
||||
}
|
||||
|
||||
/**
|
||||
* 轨迹是否显示
|
||||
*/
|
||||
fun setTraceMarkEnable(enable: Boolean) {
|
||||
niLocationItemizedLayer.isEnabled = enable
|
||||
niLocationItemizedLayerSimple.isEnabled = enable
|
||||
traceMarkerEnable = enable
|
||||
niLocationItemizedLayer.populate()
|
||||
niLocationItemizedLayerSimple.populate()
|
||||
mMapView.updateMap(true)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 增加或更新便签
|
||||
@@ -520,11 +590,18 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
||||
* 添加质检数据marker
|
||||
*/
|
||||
fun addNiLocationMarkerItem(niLocation: NiLocation) {
|
||||
synchronized(this) {
|
||||
var geoMarkerItem = createNILocationBitmap(niLocation)
|
||||
niLocationItemizedLayer.addItem(geoMarkerItem)
|
||||
niLocationItemizedLayer.update()
|
||||
}
|
||||
var geoMarkerItem = createNILocationBitmap(niLocation)
|
||||
niLocationItemizedLayer.addItem(geoMarkerItem)
|
||||
niLocationItemizedLayer.update()
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加质检数据marker
|
||||
*/
|
||||
fun addNiLocationMarkerItemSimple(niLocation: NiLocation) {
|
||||
var geoMarkerItem = createNILocationBitmap(niLocation)
|
||||
niLocationItemizedLayerSimple.addItem(geoMarkerItem)
|
||||
niLocationItemizedLayerSimple.update()
|
||||
}
|
||||
|
||||
private fun createNILocationBitmap(niLocation: NiLocation): MarkerItem {
|
||||
@@ -791,6 +868,8 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
||||
fun clearNiLocationLayer() {
|
||||
niLocationItemizedLayer.removeAllItems()
|
||||
niLocationItemizedLayer.update()
|
||||
niLocationItemizedLayerSimple.removeAllItems()
|
||||
niLocationItemizedLayerSimple.update()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -805,6 +884,18 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
||||
return niLocationItemizedLayer.itemList.size
|
||||
}
|
||||
|
||||
fun getNILocationItemizedLayerSimpleSize(): Int {
|
||||
return niLocationItemizedLayerSimple.itemList.size
|
||||
}
|
||||
|
||||
fun getNILocationSimple(index: Int): NiLocation? {
|
||||
return if (index > -1 && index < getNILocationItemizedLayerSimpleSize()) {
|
||||
((niLocationItemizedLayerSimple.itemList[index]) as MarkerItem).uid as NiLocation
|
||||
} else {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
fun getNILocation(index: Int): NiLocation? {
|
||||
return if (index > -1 && index < getNILocationItemizedLayerSize()) {
|
||||
((niLocationItemizedLayer.itemList[index]) as MarkerItem).uid as NiLocation
|
||||
@@ -833,6 +924,27 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
||||
|
||||
return -1
|
||||
}
|
||||
|
||||
fun getNILocationSimpleIndex(niLocation: NiLocation): Int? {
|
||||
|
||||
var list = niLocationItemizedLayerSimple.itemList
|
||||
|
||||
if (niLocation != null && list.isNotEmpty()) {
|
||||
|
||||
var index = -1
|
||||
|
||||
list.forEach {
|
||||
|
||||
index += 1
|
||||
|
||||
if (((it as MarkerItem).uid as NiLocation).id.equals(niLocation.id)) {
|
||||
return index
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
interface OnQsRecordItemClickListener : BaseClickListener {
|
||||
|
||||