Merge branch 'master' of gitlab.navinfo.com:CollectVehicle/OneMapQS
@@ -1587,12 +1587,12 @@
|
||||
|
||||
<!--车道中心线-->
|
||||
<m v="OMDB_LANE_LINK_LG">
|
||||
<m k="width" v="~">
|
||||
<line stroke="#7A88A0" width="2.8" />
|
||||
<!--
|
||||
<line stroke="#7A88A0" width="2.5" />
|
||||
-->
|
||||
<m k="widthProperties">
|
||||
<area use="obj-area" stroke="#7A88A0" repeat="true" src="assets:omdb/icon_5001_0.png" longEdge="t"></area>
|
||||
</m>
|
||||
<!-- <m k="width" v="~">
|
||||
<line stroke="#4624FF" width="0.1" />
|
||||
</m>-->
|
||||
</m>
|
||||
|
||||
<!-- 检查点 -->
|
||||
@@ -1630,7 +1630,7 @@
|
||||
</m>-->
|
||||
<m k="boundaryType" v="1">
|
||||
<!--无标线无可区分边界-->
|
||||
<line dasharray="5,5" repeat-start="0" stroke="#ffffff" width="0.2"/>
|
||||
<line dasharray="2,2" repeat-start="0" stroke="#ffffff" width="0.2"/>
|
||||
</m>
|
||||
</m>
|
||||
|
||||
@@ -1639,15 +1639,19 @@
|
||||
|
||||
<outline-layer id="boundary" stroke="#ffffff" width="0.1" />
|
||||
|
||||
<!--只区分虚线与实线-->
|
||||
<!-- <m k="boundaryType" v="1">
|
||||
<line dasharray="5,5" repeat-start="5" stroke="#90A0BD" width="0.05"/>
|
||||
</m>-->
|
||||
<!--护栏-->
|
||||
<m k="boundaryType" v="4">
|
||||
<line stroke="#FFBC6E" use="boundaryType" width="0.1"/>
|
||||
<symbol repeat-gap="12" repeat="true" repeat-start="0" src="assets:omdb/icon_2013_4.svg" symbol-width="16" symbol-height="46"></symbol>
|
||||
</m>
|
||||
<!--路牙-->
|
||||
<m k="boundaryType" v="3">
|
||||
<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 k="boundaryType" v="2">
|
||||
<!--标线-->
|
||||
<m k="markType" v="0|1|4|5|6|7|8">
|
||||
<!--其他|实线-->
|
||||
<m k="markType" v="1">
|
||||
<m k="markColor" v="1">
|
||||
<line stroke="#ffffff" use="boundaryType" />
|
||||
</m>
|
||||
@@ -1667,11 +1671,7 @@
|
||||
<line stroke="#8e44ad" use="boundaryType" />
|
||||
</m>
|
||||
</m>
|
||||
<m k="markType" v="2|3">
|
||||
<!--其他|实线-->
|
||||
<m v="0|1|2|3|4|5|6|7|8">
|
||||
|
||||
<!--其他|实线-->
|
||||
<m k="markType" v="2">
|
||||
<m k="markColor" v="1">
|
||||
<line dasharray="2,2" repeat-start="0" stroke="#ffffff" width="0.1"/>
|
||||
</m>
|
||||
@@ -1690,19 +1690,50 @@
|
||||
<m k="markColor" v="0|9">
|
||||
<line dasharray="2,2" repeat-start="0" stroke="#8e44ad" width="0.1"/>
|
||||
</m>
|
||||
</m>
|
||||
<m k="markType" v="8">
|
||||
<m k="markColor" v="1">
|
||||
<line dasharray="1,1" repeat-start="0" stroke="#ffffff" width="0.1"/>
|
||||
</m>
|
||||
<m k="markColor" v="2">
|
||||
<line dasharray="1,1" repeat-start="0" stroke="#eccc68" width="0.1"/>
|
||||
</m>
|
||||
|
||||
<m k="markColor" v="6">
|
||||
<line dasharray="1,1" repeat-start="0" stroke="#0000ff" width="0.1"/>
|
||||
</m>
|
||||
|
||||
<m k="markColor" v="7">
|
||||
<line dasharray="1,1" repeat-start="0" stroke="#00ff00" width="0.1"/>
|
||||
</m>
|
||||
|
||||
<m k="markColor" v="0|9">
|
||||
<line dasharray="1,1" repeat-start="0" stroke="#8e44ad" width="0.1"/>
|
||||
</m>
|
||||
</m>
|
||||
<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"/>
|
||||
</m>
|
||||
<m k="markColor" v="2">
|
||||
<symbol repeat="true" repeat-start="0" repeat-gap="24" 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>
|
||||
</m>
|
||||
|
||||
<m k="markColor" v="7">
|
||||
<symbol repeat="true" repeat-start="0" repeat-gap="24" 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>
|
||||
</m>
|
||||
</m>
|
||||
</m>
|
||||
<!--护栏-->
|
||||
<m k="boundaryType" v="4">
|
||||
<line stroke="#FFBC6E" use="boundaryType" width="0.1"/>
|
||||
<symbol repeat-gap="12" repeat="true" repeat-start="0" src="assets:omdb/icon_2013_4.svg" symbol-width="16" symbol-height="46"></symbol>
|
||||
</m>
|
||||
<!--路牙-->
|
||||
<m k="boundaryType" v="3">
|
||||
<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 k="boundaryType" v="5|7">
|
||||
<line stroke="#ffffff" use="boundaryType" />
|
||||
</m>
|
||||
@@ -1811,7 +1842,7 @@
|
||||
<!-- 环岛 -->
|
||||
<m v="OMDB_ROUNDABOUT">
|
||||
<line stroke="#fcba5a" width="0.5" />
|
||||
<symbol repeat="false" repeat-start="0" gland="false" repeat-gap="32" src="assets:omdb/icon_2204_0.svg"></symbol>
|
||||
<symbol repeat="false" repeat-start="0" gland="false" repeat-gap="0" src="assets:omdb/icon_2204_0.svg"></symbol>
|
||||
</m>
|
||||
|
||||
<!-- 上方障碍物 -->
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" width="197.9" height="198.5" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 197.9 198.5"><defs><style>.e{fill:#fad950;}.f{fill:#0a0a0a;}.g{fill:url(#d);stroke:#8b9fae;stroke-miterlimit:10;stroke-width:1.2px;}.h{fill:#535a60;opacity:0;}</style><linearGradient id="d" x1="57.2" y1="20.3" x2="140.7" y2="20.3" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#afbacb"/><stop offset=".1" stop-color="#c1ccda"/><stop offset=".4" stop-color="#d9e6f0"/><stop offset=".5" stop-color="#e3f0f8"/><stop offset=".6" stop-color="#dde9f2"/><stop offset=".8" stop-color="#ccd8e4"/><stop offset="1" stop-color="#b1bbcc"/><stop offset="1" stop-color="#aeb8c9"/></linearGradient></defs><g id="c"><g><rect class="h" y=".6" width="197.9" height="197.9"/><g><rect class="g" x="57.2" y=".6" width="83.4" height="39.3" rx="4.6" ry="4.6"/><g><path class="e" d="M62.4,4.4h73c1.4,0,2.6,1.1,2.6,2.6v28.8c0,1.4-1.1,2.6-2.6,2.6H62.4c-1.4,0-2.6-1.1-2.6-2.6V7c0-1.4,1.1-2.6,2.6-2.6Z"/><path class="f" d="M135.4,6.5c.3,0,.5,.2,.5,.5v28.8c0,.3-.2,.5-.5,.5H62.4c-.3,0-.5-.2-.5-.5V7c0-.3,.2-.5,.5-.5h73m0-4.1H62.4c-2.6,0-4.6,2.1-4.6,4.6v28.8c0,2.6,2.1,4.6,4.6,4.6h73c2.6,0,4.6-2.1,4.6-4.6V7c0-2.6-2.1-4.6-4.6-4.6h0Z"/></g><path d="M98.9,27.6c.7,0,1.3,.2,1.7,.7,.5,.5,.7,1,.7,1.7s-.2,1.2-.7,1.7c-.5,.5-1.1,.7-1.7,.7s-1.2-.2-1.7-.7c-.5-.5-.7-1-.7-1.7s.2-1.2,.7-1.7c.5-.5,1-.7,1.7-.7Zm2.1-17.3l-.5,15h-3.3l-.5-15h4.3Z"/></g></g></g></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" width="84.6" height="40.5" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 84.6 40.5"><defs><style>.e{fill:#fad950;}.f{fill:#0a0a0a;}.g{fill:url(#d);stroke:#8b9fae;stroke-miterlimit:10;stroke-width:1.2px;}</style><linearGradient id="d" x1=".6" y1="20.3" x2="84" y2="20.3" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#afbacb"/><stop offset=".1" stop-color="#c1ccda"/><stop offset=".4" stop-color="#d9e6f0"/><stop offset=".5" stop-color="#e3f0f8"/><stop offset=".6" stop-color="#dde9f2"/><stop offset=".8" stop-color="#ccd8e4"/><stop offset="1" stop-color="#b1bbcc"/><stop offset="1" stop-color="#aeb8c9"/></linearGradient></defs><g id="c"><g><rect class="g" x=".6" y=".6" width="83.4" height="39.3" rx="4.6" ry="4.6"/><g><rect class="e" x="3.2" y="4.4" width="78.1" height="33.9" rx="2.6" ry="2.6"/><path class="f" d="M78.8,6.5c.3,0,.5,.2,.5,.5v28.8c0,.3-.2,.5-.5,.5H5.8c-.3,0-.5-.2-.5-.5V7c0-.3,.2-.5,.5-.5H78.8m0-4.1H5.8C3.3,2.4,1.2,4.4,1.2,7v28.8c0,2.6,2.1,4.6,4.6,4.6H78.8c2.6,0,4.6-2.1,4.6-4.6V7c0-2.6-2.1-4.6-4.6-4.6h0Z"/></g><path d="M42.3,27.6c.7,0,1.3,.2,1.7,.7,.5,.5,.7,1,.7,1.7s-.2,1.2-.7,1.7c-.5,.5-1.1,.7-1.7,.7s-1.2-.2-1.7-.7c-.5-.5-.7-1-.7-1.7s.2-1.2,.7-1.7c.5-.5,1-.7,1.7-.7Zm2.1-17.3l-.5,15h-3.3l-.5-15h4.3Z"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
11
collect-library/src/main/assets/omdb/icon_2013_0.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<?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>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 730 B |
11
collect-library/src/main/assets/omdb/icon_2013_1.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<?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>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 730 B |
11
collect-library/src/main/assets/omdb/icon_2013_2.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<?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>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 730 B |
11
collect-library/src/main/assets/omdb/icon_2013_6.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<?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>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 730 B |
11
collect-library/src/main/assets/omdb/icon_2013_7.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<?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>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 730 B |
BIN
collect-library/src/main/assets/omdb/icon_5001_0.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
collect-library/src/main/assets/omdb/icon_5001_1.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
@@ -43,6 +43,8 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
||||
*/
|
||||
private val mDefaultTextColor = "#4E55AF"
|
||||
|
||||
private var markerEnable = true
|
||||
|
||||
/**
|
||||
* 文字画笔
|
||||
*/
|
||||
@@ -275,7 +277,12 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
||||
// 设置矢量图层均在12级以上才显示
|
||||
mMapView.vtmMap.events.bind(Map.UpdateListener { e, mapPosition ->
|
||||
if (e == Map.SCALE_EVENT) {
|
||||
qsRecordItemizedLayer.isEnabled = mapPosition.getZoomLevel() >= 12
|
||||
if(markerEnable){
|
||||
qsRecordItemizedLayer.isEnabled = mapPosition.getZoomLevel() >= 12
|
||||
}else{
|
||||
qsRecordItemizedLayer.isEnabled = false
|
||||
}
|
||||
|
||||
niLocationItemizedLayer.isEnabled = mapPosition.getZoomLevel() >= 12
|
||||
}
|
||||
})
|
||||
@@ -372,6 +379,13 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
|
||||
mMapView.updateMap(true)
|
||||
}
|
||||
|
||||
fun setQsRecordMarkEnable(enable:Boolean){
|
||||
qsRecordItemizedLayer.isEnabled = enable
|
||||
markerEnable = enable
|
||||
qsRecordItemizedLayer.populate()
|
||||
mMapView.updateMap(true)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 增加或更新便签
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.navinfo.collect.library.utils;
|
||||
|
||||
import android.graphics.Point;
|
||||
import android.os.Build;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import org.locationtech.jts.geom.Coordinate;
|
||||
@@ -13,6 +14,8 @@ import org.locationtech.jts.geom.MultiPoint;
|
||||
import org.locationtech.jts.geom.MultiPolygon;
|
||||
import org.locationtech.jts.geom.Polygon;
|
||||
import org.locationtech.jts.io.WKTReader;
|
||||
import org.locationtech.jts.operation.buffer.BufferOp;
|
||||
import org.locationtech.jts.operation.buffer.BufferParameters;
|
||||
import org.locationtech.jts.operation.linemerge.LineMerger;
|
||||
import org.oscim.core.GeoPoint;
|
||||
import org.oscim.core.MercatorProjection;
|
||||
@@ -1505,6 +1508,28 @@ public class GeometryTools {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param distLeft 单位km
|
||||
* @param distRight 单位km
|
||||
* @param wkt 几何
|
||||
* @return
|
||||
*/
|
||||
public static String computeLine(Double distLeft,Double distRight,String wkt){
|
||||
if(!TextUtils.isEmpty(wkt)){
|
||||
Geometry lineString1 = GeometryTools.createGeometry(wkt);
|
||||
BufferParameters parameters1 = new BufferParameters();
|
||||
parameters1.setEndCapStyle(BufferParameters.CAP_FLAT);
|
||||
parameters1.setSingleSided(true);
|
||||
|
||||
Geometry buffer = BufferOp.bufferOp(lineString1, distLeft, parameters1);
|
||||
Geometry buffer2 = BufferOp.bufferOp(lineString1, -distRight, parameters1);
|
||||
String bufferWkt = buffer.union(buffer2).toString();
|
||||
Log.e("qj",bufferWkt);
|
||||
return bufferWkt;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public static FootAndDistance pointToLineDistance(GeoPoint point, Geometry geometry) {
|
||||
//定义垂线
|
||||
FootAndDistance pointPairDistance = new FootAndDistance(point);
|
||||
|
||||