提交代码,修复交通标牌不显示,增加车道、道路边界类型杆状障碍物渲染

This commit is contained in:
qiji4215
2023-11-21 17:05:35 +08:00
parent 3de8ce6a39
commit 796ced9243
25 changed files with 3602 additions and 1671 deletions

View File

@@ -1615,24 +1615,29 @@
src="assets:omdb/icon_4023_0.svg" symbol-height="56" symbol-width="56"></symbol>
</m>
</m>
<!-- 道路边界类型 -->
<m v="OMDB_RDBOUND_BOUNDARYTYPE">
<outline-layer id="boundaryType" stroke="#8e44ad" width="0.1" />
<!--护栏-->
<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>
<symbol repeat="true" repeat-gap="12" gland="true" repeat-start="0.01" src="assets:omdb/icon_2013_4.svg" symbol-width="16" symbol-height="36"></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>
<symbol repeat="true" repeat-gap="12" gland="true" repeat-start="0.01" src="assets:omdb/icon_2013_3.svg" symbol-width="16" symbol-height="10"></symbol>
</m>
<m k="boundaryType" v="2|6">
<line stroke="#ffffff" use="boundaryType" width="0.1"/>
<!---->
<m k="boundaryType" v="5">
<symbol repeat="true" gland="true" repeat-gap="12" repeat-start="0.01" src="assets:omdb/icon_2013_3.svg" symbol-width="24" symbol-height="12"></symbol>
</m>
<m k="boundaryType" v="8">
<line stroke="#FFBC6E" use="boundaryType" width="0.1"/>
<symbol repeat-gap="12" repeat="true" repeat-start="0" src="assets:omdb/icon_2083_8.svg" symbol-width="24" symbol-height="32"></symbol>
<!--铺设路面边缘-->
<m k="boundaryType" v="6">
<line stroke="#8a8a8a" use="boundaryType"/>
</m>
<!--杆状障碍物-->
<m k="boundaryType" v="pole">
<symbol src="assets:omdb/icon_pole_barrier.svg" gland="true"></symbol>
</m>
</m>
@@ -1643,14 +1648,25 @@
<!--护栏-->
<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>
<symbol repeat="true" repeat-gap="12" gland="true" repeat-start="0.01" src="assets:omdb/icon_2013_4.svg" symbol-width="16" symbol-height="36"></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>
<symbol repeat="true" gland="true" repeat-gap="12" repeat-start="0.01" src="assets:omdb/icon_2013_3.svg" symbol-width="16" symbol-height="10"></symbol>
</m>
<!---->
<m k="boundaryType" v="5">
<symbol repeat="true" gland="true" repeat-gap="12" repeat-start="0.01" src="assets:omdb/icon_2013_3.svg" symbol-width="24" symbol-height="12"></symbol>
</m>
<!--铺设路面边缘-->
<m k="boundaryType" v="6">
<line stroke="#8a8a8a" use="boundaryType"/>
</m>
<!--杆状障碍物-->
<m k="boundaryType" v="pole">
<line stroke="#ffffff" use="boundaryType"/>
<symbol src="assets:omdb/icon_pole_barrier.svg" gland="true"></symbol>
</m>
<m k="boundaryType" v="2">
<!--标线-->
<m k="markMaterial" v="2|3">
@@ -1894,14 +1910,19 @@
<m k="speedFlag" v="0">
<caption fill="#000000" k="maxSpeed" priority="0" size="12" stroke="#ffffff"
stroke-width="1.0"></caption>
<symbol src="assets:omdb/icon_4002_0.svg" symbol-height="38"
symbol-width="20"></symbol>
<symbol src="assets:omdb/icon_4002_0.svg" symbol-width="24"></symbol>
</m>
<m k="speedFlag" v="1">
<caption fill="#000000" k="maxSpeed" priority="0" size="10" stroke="#ffffff"
stroke-width="1.0"></caption>
<symbol src="assets:omdb/icon_4002_1.svg" symbol-height="38"
symbol-width="20"></symbol>
<symbol src="assets:omdb/icon_4002_1.svg" symbol-width="24"></symbol>
</m>
<m k="type" v="angle">
<symbol repeat="false" repeat-gap="2000" repeat-start="0" rotate="true" symbol-width="24"
src="assets:omdb/icon_arrow_right.svg" ></symbol>
</m>
<m k="type" v="s_2_e">
<line use="s2e" />
</m>
</m>
@@ -1910,14 +1931,19 @@
<m k="speedFlag" v="0">
<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="38"
symbol-width="20"></symbol>
<symbol src="assets:omdb/icon_4003_0.svg" symbol-width="24"></symbol>
</m>
<m k="speedFlag" v="1">
<caption fill="#000000" k="maxSpeed" priority="0" size="12" stroke="#ffffff"
stroke-width="1.0"></caption>
<symbol src="assets:omdb/icon_4003_1.svg" symbol-height="38"
symbol-width="20"></symbol>
<symbol src="assets:omdb/icon_4003_1.svg" symbol-width="24"></symbol>
</m>
<m k="type" v="angle">
<symbol repeat="false" repeat-gap="2000" repeat-start="0" rotate="true" symbol-width="24"
src="assets:omdb/icon_arrow_right.svg" ></symbol>
</m>
<m k="type" v="s_2_e">
<line use="s2e" />
</m>
</m>

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 683 KiB

After

Width:  |  Height:  |  Size: 777 KiB

View File

@@ -1 +1,9 @@
<?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="1689041545166" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="30665" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M512.005117 958.708971C265.683035 958.708971 65.290005 758.316965 65.290005 511.99386c0-246.310825 200.39303-446.703855 446.715111-446.703855 246.310825 0 446.703855 200.39303 446.703855 446.703855C958.708971 758.316965 758.316965 958.708971 512.005117 958.708971zM512.005117 169.716356c-188.738595 0-342.289784 153.545048-342.289784 342.277504 0 188.738595 153.551188 342.289784 342.289784 342.289784 188.733479 0 342.278527-153.551188 342.278527-342.289784C854.283644 323.261405 700.738595 169.716356 512.005117 169.716356z" p-id="30666" fill="#fcba5a"></path></svg>
<?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="1689041545166" class="icon" viewBox="0 0 1024 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="30665" width="16" height="16"
xmlns:xlink="http://www.w3.org/1999/xlink">
<path
d="M512.005117 958.708971C265.683035 958.708971 65.290005 758.316965 65.290005 511.99386c0-246.310825 200.39303-446.703855 446.715111-446.703855 246.310825 0 446.703855 200.39303 446.703855 446.703855C958.708971 758.316965 758.316965 958.708971 512.005117 958.708971zM512.005117 169.716356c-188.738595 0-342.289784 153.545048-342.289784 342.277504 0 188.738595 153.551188 342.289784 342.289784 342.289784 188.733479 0 342.278527-153.551188 342.278527-342.289784C854.283644 323.261405 700.738595 169.716356 512.005117 169.716356z"
p-id="30666" fill="#fcba5a"></path>
</svg>

Before

Width:  |  Height:  |  Size: 900 B

After

Width:  |  Height:  |  Size: 935 B

View File

@@ -1 +1,18 @@
<?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="1695778478511" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11568" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M773.504 615.189333S771.157333 597.333333 746.688 597.333333h-79.338667c17.024 56.981333 31.936 109.546667 31.936 112.618667 0 50.922667-72.554667 72.384-190.229333 72.384-117.653333 0-184.554667-20.053333-184.554667-70.954667 0-3.562667 21.290667-57.429333 38.208-114.048h-86.677333c-17.194667 0-19.989333 15.978667-19.989333 15.978667L174.058667 874.368 188.053333 896h653.909334l8.021333-21.632-76.48-259.178667z" fill="#e54031" p-id="11569" data-spm-anchor-id="a313x.search_index.0.i15.29a03a81xPIsNv" class="selected"></path><path d="M512.021333 128c-21.952 0-39.765333 3.818667-39.765333 8.490667-10.496 31.637333-173.269333 557.717333-173.269333 571.178666 0 50.944 95.381333 81.642667 213.013333 81.642667s213.034667-30.698667 213.034667-81.642667c0-11.712-162.432-539.050667-173.269334-571.178666 0.021333-4.672-17.770667-8.490667-39.744-8.490667z" fill="#ffffff" p-id="11570" data-spm-anchor-id="a313x.search_index.0.i13.29a03a81xPIsNv" class=""></path><path d="M708.181333 649.536C683.349333 687.616 604.608 725.333333 512.981333 725.333333c-92.586667 0-173.994667-36.181333-197.994666-74.88-10.645333 31.637333-19.029333 56.469333-19.029334 69.973334 0 50.901333 96.704 90.218667 216.064 90.218666s216.128-39.338667 216.128-90.218666c0-11.690667-8.938667-38.72-19.968-70.890667zM669.589333 518.698667l-44.245333-144.938667s-39.616 31.552-113.301333 31.552c-73.664 0-113.408-31.552-113.408-31.552l-44.394667 145.194667S398.357333 576 512.042667 576c114.624 0 157.546667-57.301333 157.546666-57.301333zM581.141333 230.592l-29.354666-94.08s-1.770667-8.490667-39.765334-8.490667c-39.338667 0-39.765333 8.490667-39.765333 8.490667l-29.354667 94.016S461.781333 256 512 256c50.24 0 69.141333-25.408 69.141333-25.408z" fill="#e54031" p-id="11571" data-spm-anchor-id="a313x.search_index.0.i12.29a03a81xPIsNv" class="selected"></path></svg>
<?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="1695778478511" class="icon" viewBox="0 0 1024 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="11568" xmlns:xlink="http://www.w3.org/1999/xlink"
width="64" height="64">
<path
d="M773.504 615.189333S771.157333 597.333333 746.688 597.333333h-79.338667c17.024 56.981333 31.936 109.546667 31.936 112.618667 0 50.922667-72.554667 72.384-190.229333 72.384-117.653333 0-184.554667-20.053333-184.554667-70.954667 0-3.562667 21.290667-57.429333 38.208-114.048h-86.677333c-17.194667 0-19.989333 15.978667-19.989333 15.978667L174.058667 874.368 188.053333 896h653.909334l8.021333-21.632-76.48-259.178667z"
fill="#e54031" p-id="11569" data-spm-anchor-id="a313x.search_index.0.i15.29a03a81xPIsNv"
class="selected"></path>
<path
d="M512.021333 128c-21.952 0-39.765333 3.818667-39.765333 8.490667-10.496 31.637333-173.269333 557.717333-173.269333 571.178666 0 50.944 95.381333 81.642667 213.013333 81.642667s213.034667-30.698667 213.034667-81.642667c0-11.712-162.432-539.050667-173.269334-571.178666 0.021333-4.672-17.770667-8.490667-39.744-8.490667z"
fill="#ffffff" p-id="11570" data-spm-anchor-id="a313x.search_index.0.i13.29a03a81xPIsNv"
class=""></path>
<path
d="M708.181333 649.536C683.349333 687.616 604.608 725.333333 512.981333 725.333333c-92.586667 0-173.994667-36.181333-197.994666-74.88-10.645333 31.637333-19.029333 56.469333-19.029334 69.973334 0 50.901333 96.704 90.218667 216.064 90.218666s216.128-39.338667 216.128-90.218666c0-11.690667-8.938667-38.72-19.968-70.890667zM669.589333 518.698667l-44.245333-144.938667s-39.616 31.552-113.301333 31.552c-73.664 0-113.408-31.552-113.408-31.552l-44.394667 145.194667S398.357333 576 512.042667 576c114.624 0 157.546667-57.301333 157.546666-57.301333zM581.141333 230.592l-29.354666-94.08s-1.770667-8.490667-39.765334-8.490667c-39.338667 0-39.765333 8.490667-39.765333 8.490667l-29.354667 94.016S461.781333 256 512 256c50.24 0 69.141333-25.408 69.141333-25.408z"
fill="#e54031" p-id="11571" data-spm-anchor-id="a313x.search_index.0.i12.29a03a81xPIsNv"
class="selected"></path>
</svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -1 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" width="69.7" height="136" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 69.7 136"><defs><radialGradient id="d" cx="16.6" cy="167.7" fx="16.6" fy="167.7" r="1.3" gradientTransform="translate(-4555.9 6707) rotate(38.9) scale(76 -48) skewX(-8.4)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#b5b4b4"/><stop offset=".7" stop-color="#6e6c6c"/><stop offset="1" stop-color="#2f2f2f"/></radialGradient><radialGradient id="e" cx="16.4" cy="167.9" fx="16.4" fy="167.9" r=".5" gradientTransform="translate(-867.4 9288.4) scale(54.9 -54.9)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#e75545"/><stop offset=".8" stop-color="#c4483b"/><stop offset="1" stop-color="#983b31"/></radialGradient></defs><g id="c"><rect x="0" width="69.7" height="136" style="fill:none; stroke-width:0px;"/><ellipse cx="34.8" cy="123.5" rx="24.2" ry="8.5" style="fill:#4d4d4d; isolation:isolate; opacity:.3; stroke-width:0px;"/><ellipse cx="34.8" cy="123.5" rx="8.5" ry="3.3" style="fill:#363333; isolation:isolate; opacity:.7; stroke-width:0px;"/><path d="m23,104.9c-.5-.5-1-1-1.5-1.5C8.2,97.4-.2,84.2,0,69.7,0,49.6,15.6,33.3,34.8,33.3s34.8,16.3,34.8,36.4-9,28.3-21.7,33.7c-.4.4-.8.9-1.2,1.4-4.7,5.6-8.6,11.9-11.5,18.6,0,0-5-11.2-12.4-18.6Z" style="fill:url(#d); stroke-width:0px;"/><circle cx="34.5" cy="68.4" r="27.5" style="fill:url(#e); stroke-width:0px;"/><circle cx="34.8" cy="68" r="28" style="fill:#fff; stroke-width:0px;"/><circle cx="34.8" cy="68" r="26.5" style="fill:none; stroke:#db4646; stroke-width:3px;"/><circle cx="34.8" cy="68" r="28" style="fill:#fff; stroke-width:0px;"/><circle cx="34.8" cy="68" r="26.5" style="fill:none; stroke:#2f2f2f; stroke-width:3px;"/><line x1="11" y1="79.4" x2="44.8" y2="45.3" style="fill:none; stroke:#2f2f2f; stroke-linecap:round; stroke-width:2px;"/><line x1="15.8" y1="85.9" x2="52.3" y2="49.5" style="fill:none; stroke:#2f2f2f; stroke-linecap:round; stroke-width:2px;"/><path d="m22.8,91.7l18.7-18.7,16.5-16.5" style="fill:none; stroke:#2f2f2f; stroke-linecap:round; stroke-width:2px;"/></g></svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg id="b" xmlns="http://www.w3.org/2000/svg" width="69.7" height="136"
xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 69.7 136">
<defs>
<radialGradient id="d" cx="16.6" cy="167.7" fx="16.6" fy="167.7" r="1.3"
gradientTransform="translate(-4555.9 6707) rotate(38.9) scale(76 -48) skewX(-8.4)"
gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#b5b4b4" />
<stop offset=".7" stop-color="#6e6c6c" />
<stop offset="1" stop-color="#2f2f2f" />
</radialGradient>
<radialGradient id="e" cx="16.4" cy="167.9" fx="16.4" fy="167.9" r=".5"
gradientTransform="translate(-867.4 9288.4) scale(54.9 -54.9)"
gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#e75545" />
<stop offset=".8" stop-color="#c4483b" />
<stop offset="1" stop-color="#983b31" />
</radialGradient>
</defs>
<g id="c">
<rect x="0" width="69.7" height="136" style="fill:none; stroke-width:0px;" />
<ellipse cx="34.8" cy="123.5" rx="24.2" ry="8.5"
style="fill:#4d4d4d; isolation:isolate; opacity:.3; stroke-width:0px;" />
<ellipse cx="34.8" cy="123.5" rx="8.5" ry="3.3"
style="fill:#363333; isolation:isolate; opacity:.7; stroke-width:0px;" />
<path
d="m23,104.9c-.5-.5-1-1-1.5-1.5C8.2,97.4-.2,84.2,0,69.7,0,49.6,15.6,33.3,34.8,33.3s34.8,16.3,34.8,36.4-9,28.3-21.7,33.7c-.4.4-.8.9-1.2,1.4-4.7,5.6-8.6,11.9-11.5,18.6,0,0-5-11.2-12.4-18.6Z"
style="fill:url(#d); stroke-width:0px;" />
<circle cx="34.5" cy="68.4" r="27.5" style="fill:url(#e); stroke-width:0px;" />
<circle cx="34.8" cy="68" r="28" style="fill:#fff; stroke-width:0px;" />
<circle cx="34.8" cy="68" r="26.5" style="fill:none; stroke:#db4646; stroke-width:3px;" />
<circle cx="34.8" cy="68" r="28" style="fill:#fff; stroke-width:0px;" />
<circle cx="34.8" cy="68" r="26.5" style="fill:none; stroke:#2f2f2f; stroke-width:3px;" />
<line x1="11" y1="79.4" x2="44.8" y2="45.3"
style="fill:none; stroke:#2f2f2f; stroke-linecap:round; stroke-width:2px;" />
<line x1="15.8" y1="85.9" x2="52.3" y2="49.5"
style="fill:none; stroke:#2f2f2f; stroke-linecap:round; stroke-width:2px;" />
<path d="m22.8,91.7l18.7-18.7,16.5-16.5"
style="fill:none; stroke:#2f2f2f; stroke-linecap:round; stroke-width:2px;" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B

View File

@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 28 124">
<defs>
<style>
.cls-1 {
fill: #aa211a;
mix-blend-mode: multiply;
}
.cls-1, .cls-2, .cls-3, .cls-4, .cls-5, .cls-6, .cls-7, .cls-8, .cls-9 {
stroke-width: 0px;
}
.cls-2 {
fill: none;
opacity: 0;
}
.cls-10 {
isolation: isolate;
}
.cls-3 {
fill: url(#_铃琨眄沭噤桢眚_3);
}
.cls-4 {
fill: #721715;
}
.cls-5 {
fill: #d24f00;
}
.cls-6 {
fill: #dd2824;
}
.cls-7 {
fill: #bc1919;
}
.cls-8 {
fill: #ffe2d6;
}
.cls-9 {
fill: #ff4545;
}
</style>
<linearGradient id="_铃琨眄沭噤桢眚_3" data-name="铃琨眄沭噤桢眚 3" x1="-3198.91" y1="65.71" x2="-3176.55" y2="65.71" gradientTransform="translate(-3173.67) rotate(-180) scale(1 -1)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#d87a1e"/>
<stop offset=".21" stop-color="#d87a1e"/>
<stop offset=".21" stop-color="#c4660a"/>
<stop offset=".79" stop-color="#9f3e00"/>
<stop offset=".79" stop-color="#913300"/>
<stop offset="1" stop-color="#9d3f00"/>
</linearGradient>
</defs>
<g class="cls-10">
<g id="_图层_2" data-name="图层 2">
<g id="_图层_1-2" data-name="图层 1">
<rect class="cls-2" width="28" height="124"/>
<g>
<g>
<path class="cls-3" d="m2.88,64.12v-1.9l22.36-.58v1.32c-.02,1.74-1.12,3.48-3.3,4.81-4.38,2.67-11.46,2.69-15.81.03-2.18-1.33-3.27-3.09-3.25-4.84v1.16Z"/>
<path class="cls-6" d="m6.13,67.06c4.35,2.66,11.43,2.64,15.81-.03,4.38-2.67,4.4-7,.05-9.66-4.35-2.66-11.43-2.64-15.81.03-4.38,2.67-4.4,7-.05,9.66Z"/>
</g>
<g>
<path class="cls-5" d="m7.52,54.02l3.57-32.53-3.62,32c0,.18.02.35.06.53Z"/>
<path class="cls-5" d="m6.99,58.87c-.04-.09-.07-.19-.1-.28l-.42,3.75s.08.09.13.14l.39-3.6Z"/>
<path class="cls-1" d="m10.41,21.64s-4.45,38.19-4.45,38.52c0,.8.1,1.33.3,1.97,0,0,.07.08.19.21l.42-3.75.58-5.09,3.62-32-.68.15Z"/>
<path class="cls-6" d="m14.8,62.49l-.08-4.63-.63-35.83h-1.41l-1.63,35.39-.21,4.61-.14,3.13c1.2.47,2.6.78,4.17.7l-.06-3.37Z"/>
<path class="cls-7" d="m11.09,21.49l-3.57,32.53-.53,4.85-.39,3.6c.61.61,2.04,1.9,4.09,2.71l.14-3.13.21-4.61,1.63-35.39-1.59-.55Z"/>
<path class="cls-5" d="m7.52,54.02c-.03-.18-.05-.35-.06-.53l-.58,5.09c.03.09.06.19.1.28l.53-4.85Z"/>
<path class="cls-7" d="m17.6,21.86l-.77.18,3.66,31.62.57,4.92.53,4.59c.31-.97.43-2.01.43-3.01l-4.42-38.29Z"/>
<path class="cls-9" d="m21.06,58.58l-.57-4.92-3.66-31.62h-2.75l.63,35.83.08,4.63.06,3.37c2-.11,4.28-.85,6.73-2.7l-.53-4.59Z"/>
</g>
<g>
<path class="cls-4" d="m16.56,23.23c-1.4.86-3.69.85-5.1,0-1.41-.86-1.42-2.26-.02-3.11,1.4-.86,3.69-.85,5.1,0,1.41.86,1.42,2.26.02,3.11Z"/>
<path class="cls-4" d="m16.3,23.12c-1.34.82-3.52.81-4.86,0-1.35-.82-1.35-2.15-.02-2.97,1.34-.82,3.52-.81,4.86,0,1.35.82,1.35,2.15.02,2.97Z"/>
</g>
<g>
<path class="cls-8" d="m19.24,52.34c-3.2,2.75-8.04,2.48-10.81-.59-.59-.66-1.04-1.39-1.35-2.16-.26,2.29-.5,4.35-.69,5.99.33,1.07.89,2.1,1.71,3,3,3.33,8.17,3.76,11.55.98.91-.75,1.59-1.66,2.04-2.64l-.77-6.65c-.42.76-.98,1.47-1.68,2.08Z"/>
<path class="cls-8" d="m19.34,47.54c.43-.36.8-.76,1.12-1.19l-.75-6.53c-.23.27-.48.54-.75.78-3.02,2.64-7.59,2.39-10.21-.57-.18-.2-.34-.41-.49-.63-.23,2.01-.47,4.04-.69,5.99.25.42.54.83.88,1.21,2.83,3.2,7.72,3.62,10.91.94Z"/>
<path class="cls-8" d="m19.18,35.21l-.68-5.9c-2.74,1.8-6.51,1.69-9.05-.22-.2,1.69-.41,3.56-.64,5.51,2.82,2.45,7.32,2.73,10.37.6Z"/>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -24,7 +24,6 @@ import java.util.*
open class ReferenceEntity() : RealmObject(), Parcelable {
@PrimaryKey
var id: String = UUID.randomUUID().toString() // id
@Ignore
lateinit var name: String //要素名
lateinit var table: String //要素表名
var propertiesDb: String = ""

View File

@@ -40,6 +40,24 @@ class LineHandler(context: AppCompatActivity, mapView: NIMapView) : BaseHandler(
layer
}
/**
* 高亮线图层,同时只高亮一条线,如要素本身线型
*/
private val mDataGeometryPathLayer: PathLayer by lazy {
//高亮线绘制线 样式
val defaultLineStyle = Style.builder()
.stippleColor(context.resources.getColor(R.color.teal_200))
.strokeWidth(5f)
.fillColor(context.resources.getColor(R.color.draw_line_blue2_color))
.fillAlpha(0.3f)
.strokeColor(context.resources.getColor(R.color.draw_line_blue2_color))
.fixed(true).build()
val layer = PathLayer(mMapView.vtmMap, defaultLineStyle)
addLayer(layer, NIMapView.LAYER_GROUPS.OPERATE_LINE)
layer
}
/**
* 路口高亮
@@ -139,6 +157,42 @@ class LineHandler(context: AppCompatActivity, mapView: NIMapView) : BaseHandler(
}
}
/**
* 高亮一条线
*/
fun showElementLine(list:List<GeoPoint>) {
try {
mDataGeometryPathLayer.clearPath()
mDataGeometryPathLayer.setPoints(list)
mDataGeometryPathLayer.isEnabled = true
} catch (e: Exception) {
Toast.makeText(mContext, "高亮路线失败 ${e.message}", Toast.LENGTH_SHORT).show()
}
}
/**
* 高亮一条线
*/
fun showElementLine(geometry: String) {
try {
mDataGeometryPathLayer.clearPath()
mDataGeometryPathLayer.setPoints(GeometryTools.getGeoPoints(geometry))
mDataGeometryPathLayer.isEnabled = true
} catch (e: Exception) {
Toast.makeText(mContext, "高亮路线失败 ${e.message}", Toast.LENGTH_SHORT).show()
}
}
/**
* 取消高亮线
*/
fun removeElementLine() {
mDataGeometryPathLayer.clearPath()
mDataGeometryPathLayer.isEnabled = false
}
/**
* 取消高亮线
@@ -148,6 +202,14 @@ class LineHandler(context: AppCompatActivity, mapView: NIMapView) : BaseHandler(
mDefaultPathLayer.isEnabled = false
}
/**
* 取消高亮线
*/
fun removeAllLine() {
removeLine()
removeElementLine()
}
/**
* 移除所有任务高亮线
*/

View File

@@ -93,6 +93,26 @@ class MarkHandler(context: AppCompatActivity, mapView: NIMapView) :
layer
}
/**
* 默认marker图层
*/
private val mDataMarkerLayer: ItemizedLayer by lazy {
//新增marker图标样式
val mDefaultBitmap =
AndroidBitmap(BitmapFactory.decodeResource(context.resources, R.mipmap.icon_path_maker))
mDefaultBitmap.scaleTo(150, 150)
val markerSymbol = MarkerSymbol(
mDefaultBitmap,
MarkerSymbol.HotspotPlace.CENTER
)
val layer = ItemizedLayer(
mapView.vtmMap,
markerSymbol,
)
addLayer(layer, NIMapView.LAYER_GROUPS.OPERATE_MARKER)
layer
}
private val niLocationBitmap: Bitmap by lazy {
AndroidBitmap(
BitmapFactory.decodeResource(

View File

@@ -75,11 +75,10 @@ public class OMDBDataDecoder extends TileDecoder {
listResult.stream().iterator().forEachRemaining(new Consumer<RenderEntity>() {
@Override
public void accept(RenderEntity renderEntity) {
if (!(mapLevel < renderEntity.getZoomMin() || mapLevel > renderEntity.getZoomMax())) {
if (renderEntity.getCode().equals(DataCodeEnum.OMDB_TRAFFIC_SIGN.getCode())) {
list.add(renderEntity);
}else if (renderEntity.getCode().equals(DataCodeEnum.OMDB_TRAFFICLIGHT.getCode())) {
} else if (renderEntity.getCode().equals(DataCodeEnum.OMDB_TRAFFICLIGHT.getCode())) {
traffList.add(renderEntity);
} else {
Map<String, Object> properties = new HashMap<>(renderEntity.getProperties().size());
@@ -93,8 +92,8 @@ public class OMDBDataDecoder extends TileDecoder {
});
//增加交通标牌聚合显示
List<RenderEntity> list1 = GeometryTools.groupByDistance(DataCodeEnum.OMDB_TRAFFIC_SIGN.getCode(), list, 5.0);
if(list1!=null&&list1.size()>0){
Log.e("qj","聚合交通标牌转换开始"+list.size());
if (list1 != null && list1.size() > 0) {
Log.e("qj", "聚合交通标牌转换开始" + list.size());
list1.stream().iterator().forEachRemaining(new Consumer<RenderEntity>() {
@Override
public void accept(RenderEntity renderEntity) {
@@ -103,12 +102,12 @@ public class OMDBDataDecoder extends TileDecoder {
parseGeometry(renderEntity.getTable(), renderEntity.getWkt(), properties);
}
});
Log.e("qj","聚合交通标牌转换结束"+list1.size());
Log.e("qj", "聚合交通标牌转换结束" + list1.size());
}
//增加交通标牌聚合显示
List<RenderEntity> list2 = GeometryTools.groupByDistance(DataCodeEnum.OMDB_TRAFFICLIGHT.getCode(), traffList, 5.0);
if(list2!=null&&list2.size()>0){
Log.e("qj","聚合红绿灯转换开始"+traffList.size());
if (list2 != null && list2.size() > 0) {
Log.e("qj", "聚合红绿灯转换开始" + traffList.size());
list2.stream().iterator().forEachRemaining(new Consumer<RenderEntity>() {
@Override
public void accept(RenderEntity renderEntity) {
@@ -117,7 +116,7 @@ public class OMDBDataDecoder extends TileDecoder {
parseGeometry(renderEntity.getTable(), renderEntity.getWkt(), properties);
}
});
Log.e("qj","聚合红绿灯转换结束"+list2.size());
Log.e("qj", "聚合红绿灯转换结束" + list2.size());
}
return true;
}

View File

@@ -127,7 +127,6 @@ public class OMDBTileDataSource implements ITileDataSource {
for (String type : Constant.HAD_LAYER_INVISIABLE_ARRAY) {
realmQuery.notEqualTo("table", type);
}
realmQuery.notEqualTo("table", "OMDB_TRAFFIC_SIGN");
realmQuery.endGroup();
}
long time = System.currentTimeMillis();

View File

@@ -35,7 +35,7 @@ import java.util.List;
* @author qj 几何工具类
*/
public class GeometryTools {
private final static String TAG = "GeometryTools";
static final double PI = 3.14159216;
private static volatile GeometryTools mInstance;
static double earthRadiusMeters = 6371000.0;
@@ -1647,4 +1647,89 @@ public class GeometryTools {
return listReslut;
}
/**
* 线几何按距离等分点
*/
public static synchronized List<GeoPoint> getLineToDengGeoPints(Geometry lineGeometry, double dengDisance) {
List<GeoPoint> geoPointList = new ArrayList<>();
//获取线几何点
List<GeoPoint> list = getGeoPoints(lineGeometry);
if(list!=null&&list.size()>=2) {
for (int i = 0; i < list.size() - 1; i++) {
GeoPoint geoPoint1 = list.get(i);
GeoPoint geoPoint2 = list.get(i + 1);
double disance = getDistance(geoPoint1.getLatitude(), geoPoint1.getLongitude(), geoPoint2.getLatitude(), geoPoint2.getLongitude());
//只有第一个点进行添加,后面数据过滤掉
if(i==0){
geoPointList.add(geoPoint1);
}
geoPointList.add(geoPoint2);
if (disance > dengDisance) {
//向上取整
int num = (int) Math.ceil(disance / dengDisance);
//计算等分数据
List<GeoPoint> dengList = getDengGeoPoint(geoPoint1, geoPoint2, num);
if (dengList != null && dengList.size() > 0) {
geoPointList.addAll(dengList);
}
}
}
}
return geoPointList;
}
/**
* 计算两点之间等距的经纬度
*/
private static List<GeoPoint> getDengGeoPoint(GeoPoint geoPoint1, GeoPoint geoPoint2, int number) {
double aaa, bbb, ccc = 0, ddd = 0;
List<GeoPoint> geoPointList = new ArrayList<>();
for (int i = 1; i < number + 1; i++) {
if (geoPoint1.getLongitude() > geoPoint2.getLongitude() && geoPoint1.getLatitude() > geoPoint2.getLatitude()) {
aaa = (geoPoint1.getLongitude() - geoPoint2.getLongitude()) / (number + 1);
ccc = geoPoint2.getLongitude() + aaa * (i);
bbb = (geoPoint1.getLatitude() - geoPoint2.getLatitude()) / (number + 1);
ddd = bbb * (i) + geoPoint2.getLatitude();
Log.e(TAG, "getLatLng:a " + ddd + " " + ccc);
} else if (geoPoint1.getLongitude() < geoPoint2.getLongitude() && geoPoint1.getLatitude() < geoPoint2.getLatitude()) {
aaa = (geoPoint2.getLongitude() - geoPoint1.getLongitude()) / (number + 1);
ccc = geoPoint1.getLongitude() + aaa * (i);
bbb = (geoPoint2.getLatitude() - geoPoint1.getLatitude()) / (number + 1);
ddd = geoPoint1.getLatitude() + bbb * i;
Log.e(TAG, "getLatLng:b " + ddd + " " + ccc);
} else if (geoPoint1.getLongitude() > geoPoint2.getLongitude() && geoPoint1.getLatitude() < geoPoint2.getLatitude()) {
aaa = (geoPoint1.getLongitude() - geoPoint2.getLongitude()) / (number + 1);
ccc = geoPoint2.getLongitude() + aaa * (number + 1 - i);
bbb = (geoPoint2.getLatitude() - geoPoint1.getLatitude()) / (number + 1);
ddd = geoPoint1.getLatitude() + bbb * i;
Log.e(TAG, "getLatLng:c " + ddd + " " + ccc);
} else if (geoPoint1.getLongitude() < geoPoint2.getLongitude() && geoPoint1.getLatitude() > geoPoint2.getLatitude()) {
aaa = (geoPoint2.getLongitude() - geoPoint1.getLongitude()) / (number + 1);
ccc = geoPoint1.getLongitude() + aaa * (i);
bbb = (geoPoint1.getLatitude() - geoPoint2.getLatitude()) / (number + 1);
ddd = geoPoint1.getLatitude() - bbb * i;
Log.e(TAG, "getLatLng:d " + ddd + " " + ccc);
}
geoPointList.add(new GeoPoint(ddd, ccc));
}
return geoPointList;
}
}