Merge branch 'master' of gitlab.navinfo.com:CollectVehicle/OneMapQS

 Conflicts:
	collect-library/src/main/assets/editormarker.xml
	vtm
This commit is contained in:
squallzhjch 2023-06-16 15:24:02 +08:00
commit 89c7fd4585
6 changed files with 136 additions and 139 deletions

View File

@ -170,6 +170,11 @@
"table": "OMDB_LANE_LINK_LG",
"code": 5001,
"name": "车道中心线"
}
},
"5002":{
"table": "OMDB_AREA",
"code": 5002,
"name": "面测试"
}
}
}

View File

@ -119,14 +119,28 @@ class ImportPreProcess {
* 解析车道边线数据二级属性
* */
fun unpackingLaneBoundary(renderEntity: RenderEntity) {
var shape:JSONObject = JSONObject(mapOf(
"lateralOffset" to 0,
"markType" to 1,
"markColor" to 0,
"markMaterial" to 1,
"markSeqNum" to 1,
"markWidth" to 10,
"markingCount" to 1
))
if (renderEntity.code == 2013&&!renderEntity.properties["shapeList"].isNullOrEmpty()&&renderEntity.properties["shapeList"]!="null") {
// 解析shapeList将数组中的属性放会properties
val shapeList = JSONArray(renderEntity.properties["shapeList"])
val shape = shapeList.getJSONObject(0)
for (key in shape.keys()) {
renderEntity.properties[key] = shape[key].toString()
for (i in 0 until shapeList.length()) {
shape = shapeList.getJSONObject(i)
if (shape.optInt("lateralOffset", 0) == 0) {
break
}
}
}
for (key in shape.keys()) {
renderEntity.properties[key] = shape[key].toString()
}
}
/**

View File

@ -112,7 +112,7 @@ class PersonalCenterFragment(private var backListener: (() -> Unit?)? = null) :
viewModel.readRealmData()
// 定位到指定位置
niMapController.mMapView.vtmMap.animator()
.animateTo(GeoPoint(40.031657799200346, 116.32207834810715))
.animateTo(GeoPoint( 40.034842306317486, 116.31735963074652 ))
}
// R.id.personal_center_menu_task_list -> {
// findNavController().navigate(R.id.TaskManagerFragment)

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<rendertheme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" map-background="#f4f4f4"
version="1" xmlns="http://opensciencemap.org/rendertheme" xsi:schemaLocation="http://opensciencemap.org/rendertheme
version="1" xmlns="http://opensciencemap.org/rendertheme"
xsi:schemaLocation="http://opensciencemap.org/rendertheme
https://raw.githubusercontent.com/mapsforge/vtm/master/resources/rendertheme.xsd">
<!--###### TRANSFORM tags ######-->
@ -45,8 +46,8 @@
<!--references-->
<style-text style="bold" fill="#606060" id="ref" k="ref" priority="2" size="12" stroke="#ffffff"
stroke-width="2.0" />
<style-text style="bold" bg-fill="#45a976" caption="true" fill="#ffffff" id="ref-caption" k="ref"
priority="2" size="12" />
<style-text caption="true" style="bold" fill="#ffffff" id="ref-caption" k="ref" priority="2"
size="12" bg-fill="#45a976" />
<!--ferry-->
<style-text style="bold" fill="#606060" id="ferry" k="name" size="12" stroke="#ffffff"
stroke-width="2.0" />
@ -173,7 +174,7 @@
<style-symbol id="oneway" repeat="true" src="assets:symbols/oneway.svg" />
<!-- omdb -->
<style-line id="boundaryType" stipple-width="0.1" width="0.1" />
<style-line id="boundaryType" width="0.1" stipple-width="0.1" />
<!--###### ASSIGNMENT ######-->
@ -1479,19 +1480,18 @@
</m>
<!-- 自定义渲染样式 -->
<m k="navi_type" zoom-max="22" zoom-min="15">
<m k="navi_type" zoom-min="15" zoom-max="22">
<!-- 车道中心线 -->
<m v="had_lane_link">
<line dasharray="20,20" fix="true" stipple-stroke="#00000000" stroke="#ff0000"
width="0.3" />
<line stroke="#ff0000" stipple-stroke="#00000000" dasharray="20,20" fix="true" width="0.3" />
</m>
<!-- 车道边线 -->
<m v="had_lane_mark_link">
<line stipple-width="0.5" stroke="#0000ff" width="0.1" />
<line stroke="#0000ff" width="0.1" stipple-width="0.5"/>
</m>
<!--道路箭头 objectArrow-->
<m v="object_arrow">
<area fade="5" fill="#88aaaa00" stroke="#ff0000" stroke-width="0.1"></area>
<area fill="#88aaaa00" stroke="#ff0000" stroke-width="0.1" fade="5"></area>
</m>
<!--人行横道 objectcrosswalk-->
<m v="object_crosswalk">
@ -1503,7 +1503,7 @@
</m>
<!--杆状物 objectpole-->
<m v="object_pole">
<line stipple-width="0.5" stroke="#8800aaaa" width="0.1" />
<line stroke="#8800aaaa" width="0.1" stipple-width="0.5"/>
</m>
<!--对象标志 objectsymbol-->
<m v="object_symbol">
@ -1514,7 +1514,7 @@
<area fill="#8800cc00" stroke="#00cc00" stroke-width="0.2"></area>
</m>
<m zoom-max="19" zoom-min="15">
<m zoom-min="15" zoom-max="19">
<text use="ferry" />
</m>
@ -1538,20 +1538,19 @@
<m k="nav_style">
<m v="symbol_object_line">
<m k="rule" zoom-max="22" zoom-min="15">
<m k="rule" zoom-min="15" zoom-max="22">
<!-- 蓝色黑色间隔线 -->
<m v="blue_link">
<line dasharray="20,20" fix="true" stipple-stroke="#00000000" stroke="#00000000"
width="0.1" />
<line stroke="#00000000" stipple-stroke="#00000000" dasharray="20,20" fix="true" width="0.1" />
</m>
<!-- 黄色线 -->
<m v="yellow_link">
<line stipple-width="0.1" stroke="#f4ea2a" width="0.1" />
<line stroke="#f4ea2a" width="0.1" stipple-width="0.1"/>
</m>
</m>
<line stipple-width="0.5" stroke="#33aaaa" width="0.3" />
<line stroke="#33aaaa" width="0.3" stipple-width="0.5"/>
</m>
<m v="symbol_track_point" zoom-max="25" zoom-min="10">
<m v="symbol_track_point" zoom-min="10" zoom-max="25">
<symbol src="assets:symbols/dot_blue.svg" />
</m>
</m>
@ -1561,89 +1560,77 @@
<m v="OMDB_LANE_NUM">
<m k="laneNum">
<m v="1">
<line stroke="#545D6C" width="3" />
<line stroke="#545D6C" width="3"/>
</m>
<m v="2">
<line stroke="#545D6C" width="6" />
<line stroke="#545D6C" width="6"/>
</m>
<m v="3">
<line stroke="#545D6C" width="9" />
<line stroke="#545D6C" width="9"/>
</m>
<m v="4">
<line stroke="#545D6C" width="12" />
<line stroke="#545D6C" width="12"/>
</m>
<m v="5">
<line stroke="#545D6C" width="15" />
<line stroke="#545D6C" width="15"/>
</m>
<m v="6">
<line stroke="#545D6C" width="18" />
</m>
<m v="7">
<line stroke="#545D6C" width="21" />
<line stroke="#545D6C" width="21"/>
</m>
<m v="8">
<line stroke="#545D6C" width="24" />
<line stroke="#545D6C" width="24"/>
</m>
<m v="9">
<line stroke="#545D6C" width="27" />
<line stroke="#545D6C" width="27"/>
</m>
<m v="10">
<line stroke="#545D6C" width="30" />
<line stroke="#545D6C" width="30"/>
</m>
<m v="11">
<line stroke="#545D6C" width="33" />
<line stroke="#545D6C" width="33"/>
</m>
<m v="12">
<line stroke="#545D6C" width="36" />
<line stroke="#545D6C" width="36"/>
</m>
</m>
</m>
<!-- 道路线 -->
<m v="OMDB_RD_LINK">
<line stroke="#9c9c9c" width="1" />
<line stroke="#9c9c9c" width="1"/>
</m>
<!--道路种别-->
<m v="OMDB_RD_LINK_KIND">
<m k="kind">
<m v="1">
<line stroke="#fcacd4" width="1" />
</m>
<m v="2">
<line stroke="#dcacfc" width="1" />
</m>
<m v="3">
<line stroke="#fc9c9c" width="1" />
</m>
<m v="4">
<line stroke="#fcd484" width="1" />
</m>
<m v="5">
<line stroke="#ecfccc" width="1" />
</m>
<m v="6">
<line stroke="#acec84" width="1" />
</m>
<m v="7">
<line stroke="#806048" width="1" />
</m>
<m v="8">
<line stroke="#fcfc7c" width="1" />
</m>
<m v="9">
<line stroke="#acc4fc" width="1" />
</m>
<m v="10">
<line stroke="#8cc8e0" width="1" />
</m>
<m v="11">
<line stroke="#64ecdc" width="1" />
</m>
<m v="13">
<line stroke="#585080" width="1" />
</m>
<m v="15">
<line stroke="#647430" width="1" />
</m>
<outline-layer id="kind0" stroke="#44000000" width="0.1" />
<outline-layer id="kind1" stroke="#aa807040" width="0.1" />
<m k="kind" v="1">
<line outline="kind0" blur="0.3" use="highway:z11" />
</m>
<m k="kind" v="2|3">
<line outline="kind0" use="trunk" />
</m>
<m k="kind" v="4">
<line outline="kind0" use="primary:z11" />
</m>
<m k="kind" v="5|6">
<line outline="kind0" use="secondary:z11" />
</m>
<m k="kind" v="7">
<line outline="kind0" use="tertiary" />
</m>
<m k="kind" v="8">
<line outline="kind0" use="residential" />
</m>
<m k="kind" v="9|10">
<line outline="kind0" use="footway:z17" />
</m>
<m k="kind" v="11|13">
<line outline="kind0" use="ferry" />
</m>
<m k="kind" v="15">
<line outline="kind0" use="highway:cycleway" />
</m>
</m>
@ -1653,69 +1640,65 @@
<m v="0">
<!-- <symbol src="assets:omdb/round_speedlimit.svg" symbol-width="30" symbol-height="30"></symbol>-->
<caption fill="#000000" k="maxSpeed" priority="0" size="12" stroke="#ffffff"
<m k="speedFlag" v="0">
<!-- <symbol src="assets:omdb/round_speedlimit.svg" symbol-width="30" symbol-height="30"></symbol>-->
<caption k="maxSpeed" fill="#000000" priority="0" size="12" stroke="#ffffff"
stroke-width="1.0"></caption>
<symbol src="assets:omdb/icon_4002_0.svg" symbol-height="46"
symbol-width="46"></symbol>
<!-- <caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"-->
<!-- stroke-width="1.0"></caption>-->
</m>
<m v="1">
<caption fill="#000000" k="maxSpeed" priority="0" size="12" stroke="#ffffff"
stroke-width="1.0"></caption>
<symbol src="assets:omdb/icon_4002_1.svg" symbol-height="46"
symbol-width="46"></symbol>
<!-- <caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"-->
<!-- stroke-width="1.0"></caption>-->
</m>
<symbol src="assets:omdb/icon_4002_0.svg" symbol-width="46" symbol-height="46"></symbol>
<!-- <caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"-->
<!-- stroke-width="1.0"></caption>-->
</m>
<m k="speedFlag" v="1">
<caption k="maxSpeed" fill="#000000" priority="0" size="12" stroke="#ffffff"
stroke-width="1.0"></caption>
<symbol src="assets:omdb/icon_4002_1.svg" symbol-width="46" symbol-height="46"></symbol>
<!-- <caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"-->
<!-- stroke-width="1.0"></caption>-->
</m>
</m>
<!--条件点限速-->
<m v="OMDB_SPEEDLIMIT_COND">
<m k="speedFlag" v="0">
<!-- <symbol src="assets:omdb/round_speedlimit.svg" symbol-width="30" symbol-height="30"></symbol>-->
<caption fill="#000000" k="maxSpeed" priority="0" size="12" stroke="#ffffff"
stroke-width="1.0"></caption>
<symbol src="assets:omdb/icon_4003_0.svg" symbol-height="46"
symbol-width="46"></symbol>
<!-- <caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"-->
<!-- stroke-width="1.0"></caption>-->
<!-- <symbol src="assets:omdb/round_speedlimit.svg" symbol-width="30" symbol-height="30"></symbol>-->
<caption k="maxSpeed" fill="#000000" priority="0" size="12" stroke="#ffffff"
stroke-width="1.0"></caption>
<symbol src="assets:omdb/icon_4003_0.svg" symbol-width="46" symbol-height="46"></symbol>
<!-- <caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"-->
<!-- stroke-width="1.0"></caption>-->
</m>
<m k="speedFlag" v="1">
<caption fill="#000000" k="maxSpeed" priority="0" size="12" stroke="#ffffff"
<caption k="maxSpeed" fill="#000000" priority="0" size="12" stroke="#ffffff"
stroke-width="1.0"></caption>
<symbol src="assets:omdb/icon_4003_1.svg" symbol-height="46"
symbol-width="46"></symbol>
<!-- <caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"-->
<!-- stroke-width="1.0"></caption>-->
<symbol src="assets:omdb/icon_4003_1.svg" symbol-width="46" symbol-height="46"></symbol>
<!-- <caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"-->
<!-- stroke-width="1.0"></caption>-->
</m>
</m>
<!--可变点限速-->
<m v="OMDB_SPEEDLIMIT_VAR">
<m v="0">
<m k="speedFlag" v="0">
<!-- <symbol src="assets:omdb/round_speedlimit.svg" symbol-width="30" symbol-height="30"></symbol>-->
<caption fill="#000000" k="maxSpeed" priority="0" size="12" stroke="#ffffff"
<caption k="maxSpeed" fill="#000000" priority="0" size="12" stroke="#ffffff"
stroke-width="1.0"></caption>
<symbol src="assets:omdb/icon_4004_0.svg" symbol-height="46"
symbol-width="46"></symbol>
<caption dy="-28" fill="#000000" k="minSpeed" priority="0" size="14"
stroke="#ffffff" stroke-width="1.0"></caption>
<symbol src="assets:omdb/icon_4004_0.svg" symbol-width="46" symbol-height="46"></symbol>
<!-- <caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"-->
<!-- stroke-width="1.0"></caption>-->
</m>
<m v="1">
<caption fill="#000000" k="maxSpeed" priority="0" size="12" stroke="#ffffff"
<m k="speedFlag" v="1">
<caption k="maxSpeed" fill="#000000" priority="0" size="12" stroke="#ffffff"
stroke-width="1.0"></caption>
<symbol src="assets:omdb/icon_4004_1.svg" symbol-height="46"
symbol-width="46"></symbol>
<caption dy="-28" fill="#000000" k="minSpeed" priority="0" size="14"
stroke="#ffffff" stroke-width="1.0"></caption>
<symbol src="assets:omdb/icon_4004_1.png" symbol-width="46" symbol-height="46"></symbol>
<!-- <caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"-->
<!-- stroke-width="1.0"></caption>-->
</m>
</m>
<!--车道中心线-->
<m v="OMDB_LANE_LINK_LG">
<line dasharray="35,35" stroke="#ecf0f1" width="0.1" />
<line stroke="#ecf0f1" width="0.1" dasharray="35,35"/>
</m>
<!-- 道路边界类型 -->
<m v="OMDB_RDBOUND_BOUNDARYTYPE">
<line stroke="#ffffff" width="0.1" />
<line stroke="#ffffff" width="0.1"/>
</m>
<!-- 车道边界类型 -->
<m v="OMDB_LANE_MARK_BOUNDARYTYPE">
@ -1728,19 +1711,19 @@
<m v="0|1">
<m k="markColor">
<m v="0|1">
<line stroke="#ffffff" use="boundaryType" />
<line stroke="#ffffff" use="boundaryType"/>
</m>
<m v="2">
<line stroke="#eccc68" use="boundaryType" />
<line stroke="#eccc68" use="boundaryType"/>
</m>
<m v="6">
<line stroke="#0000ff" use="boundaryType" />
<line stroke="#0000ff" use="boundaryType"/>
</m>
<m v="7">
<line stroke="#00ff00" use="boundaryType" />
<line stroke="#00ff00" use="boundaryType"/>
</m>
<m v="9">
<line stroke="#8e44ad" use="boundaryType" />
<line stroke="#8e44ad" use="boundaryType"/>
</m>
</m>
</m>
@ -1748,32 +1731,31 @@
<m v="2">
<m k="markColor">
<m v="0|1">
<line dasharray="3,13" stroke="#ffffff" use="boundaryType" />
<line stroke="#ffffff" stipple-stroke="#000000" stipple="5" use="boundaryType" dasharray="13,135"/>
</m>
<m v="2">
<line dasharray="3,3" stroke="#eccc68" use="boundaryType" />
<line stroke="#eccc68" stipple-stroke="#ffffff" stipple="5" use="boundaryType" dasharray="13,135"/>
</m>
<m v="6">
<line dasharray="3,3" stroke="#0000ff" use="boundaryType" />
<line stroke="#0000ff" stipple-stroke="#ffffff" stipple="5" use="boundaryType" dasharray="13,135"/>
</m>
<m v="7">
<line dasharray="3,3" stroke="#00ff00" use="boundaryType" />
<line stroke="#00ff00" stipple-stroke="#ffffff" stipple="5" use="boundaryType" dasharray="13,135"/>
</m>
<m v="9">
<line dasharray="3,3" stroke="#8e44ad" use="boundaryType" />
<line stroke="#8e44ad" stipple-stroke="#ffffff" stipple="5" use="boundaryType" dasharray="13,135"/>
</m>
</m>
</m>
<!--导流区边线-->
<m v="4">
<line outline="boundary" stroke="#545D6C"></line>
<lineSymbol repeat-gap="0.5" repeat-start="0"
src="assets:omdb/icon_right.png" />
<lineSymbol src="assets:omdb/icon_right.png" repeat-start="0" repeat-gap="0.5"/>
</m>
<!-- &lt;!&ndash;铺设路面边缘&ndash;&gt;-->
<!-- <m v="5">-->
<!-- <line outline="#ffffff" fix="true" src="assets:omdb/icon_close.png" stroke="#ffffffff" use="boundaryType"/>-->
<!-- </m>-->
<!-- &lt;!&ndash;铺设路面边缘&ndash;&gt;-->
<!-- <m v="5">-->
<!-- <line outline="#ffffff" fix="true" src="assets:omdb/icon_close.png" stroke="#ffffffff" use="boundaryType"/>-->
<!-- </m>-->
</m>
</m>
</m>
@ -1782,33 +1764,30 @@
<m v="OMDB_LINK_DIRECT">
<m k="direct">
<m v="2">
<!-- <lineSymbol src="assets:omdb/oneway_right.svg"></lineSymbol>-->
<lineSymbol src="assets:omdb/oneway_right.svg"></lineSymbol>
<!-- <lineSymbol src="assets:omdb/oneway_right.svg"></lineSymbol>-->
<lineSymbol src="assets:omdb/oneway_right.svg" ></lineSymbol>
</m>
<m v="3">
<!-- <lineSymbol src="assets:omdb/oneway_left.svg"></lineSymbol>-->
<!-- <lineSymbol src="assets:omdb/oneway_left.svg"></lineSymbol>-->
<lineSymbol src="assets:omdb/oneway_left.svg"></lineSymbol>
</m>
</m>
</m>
<!--交通灯-->
<m v="OMDB_TRAFFICLIGHT">
<symbol repeat="false" rotate="false" src="assets:omdb/icon_4022_0.svg"
symbol-height="69" symbol-width="69"></symbol>
<symbol src="assets:omdb/icon_4022_0.svg" repeat="false" symbol-width="69" symbol-height="69" rotate="false"></symbol>
</m>
<!--普通交限-->
<m v="OMDB_RESTRICTION">
<m k="angle">
<symbol repeat="false" repeat-start="0" rotate="false"
src="assets:omdb/icon_4006_0.svg" symbol-height="69" symbol-width="69"></symbol>
<symbol src="assets:omdb/icon_4006_0.svg" repeat="false" symbol-width="69" symbol-height="69" rotate="false" repeat-start="0" ></symbol>
</m>
<m k="type" v="angle">
<symbol repeat="false" repeat-gap="2000" repeat-start="0"
rotate="true" src="assets:omdb/icon_arrow_right.svg" symbol-height="76" symbol-width="76"></symbol>
</m>
<m k="type" v="s_2_e">
<line dasharray="1,1" repeat-gap="3" repeat-start="0" stroke="#14582c"
width="0.1" />
<line stroke="#14582c" width="0.1" dasharray="1,1" repeat-gap="3" repeat-start="0"/>
</m>
</m>
</m>

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@ -105,7 +105,6 @@ class LayerManagerHandler(context: AppCompatActivity, mapView: NIMapView, traceP
}
private fun initOMDBVectorTileLayer() {
// 初始化OMDB参考相关图层
omdbReferenceTileLayer = VectorTileLayer(mMapView.vtmMap, omdbReferenceTileSource)
omdbReferenceLabelLayer = LabelLayer(