增加车道边界类型渲染2.增加地图级别联动底部工具栏调整位置
This commit is contained in:
parent
c8c7c4d4ce
commit
3c5c1c3220
@ -38,6 +38,8 @@ import com.navinfo.omqs.util.FlowEventBus
|
||||
import com.navinfo.omqs.util.SpeakMode
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import kotlinx.coroutines.launch
|
||||
import org.oscim.core.GeoPoint
|
||||
import org.oscim.renderer.GLViewport
|
||||
import org.videolan.vlc.Util
|
||||
import java.math.BigDecimal
|
||||
import java.math.RoundingMode
|
||||
@ -503,9 +505,14 @@ class MainActivity : BaseActivity() {
|
||||
}
|
||||
|
||||
binding.mainActivityBottomSheetGroup.visibility = View.GONE
|
||||
|
||||
mapController.mMapView.setScaleBarLayer(GLViewport.Position.BOTTOM_CENTER, 128, 5)
|
||||
} else {
|
||||
binding.mainActivityBottomSheetGroup.visibility = View.VISIBLE
|
||||
mapController.mMapView.setScaleBarLayer(GLViewport.Position.BOTTOM_CENTER, 128, 65)
|
||||
}
|
||||
mapController.mMapView.vtmMap.animator()
|
||||
.animateTo(GeoPoint( mapController.mMapView.vtmMap.mapPosition.latitude,mapController.mMapView.vtmMap.mapPosition.latitude))
|
||||
}
|
||||
|
||||
private fun voiceOnTouchStart() {
|
||||
|
@ -113,10 +113,10 @@ class PersonalCenterFragment(private var backListener: (() -> Unit?)? = null) :
|
||||
}
|
||||
R.id.personal_center_menu_test -> {
|
||||
viewModel.readRealmData()
|
||||
//108.92242999223849 34.27711899342322
|
||||
//108.91056000267433 34.29635901721207
|
||||
// 定位到指定位置
|
||||
niMapController.mMapView.vtmMap.animator()
|
||||
.animateTo(GeoPoint( 34.27711899342322, 108.92242999223849))
|
||||
.animateTo(GeoPoint( 34.29635901721207, 108.91056000267433))
|
||||
}
|
||||
// R.id.personal_center_menu_task_list -> {
|
||||
// findNavController().navigate(R.id.TaskManagerFragment)
|
||||
|
@ -1707,7 +1707,48 @@
|
||||
</m>0
|
||||
<!-- 道路边界类型 -->
|
||||
<m v="OMDB_RDBOUND_BOUNDARYTYPE">
|
||||
<line stroke="#ffffff" width="0.1" />
|
||||
<outline-layer id="boundaryType" stroke="#fcba5a" width="0.2" />
|
||||
<m k="boundaryType" v="0">
|
||||
<!--不应用-->
|
||||
<line stroke="#fcba5a" use="boundaryType"/>
|
||||
<lineSymbol repeat-gap="12" repeat-start="12" symbol-height="16" symbol-width="16" src="assets:omdb/icon_2083_0.svg" />
|
||||
</m>
|
||||
<m k="boundaryType" v="1">
|
||||
<!--无标线无可区分边界-->
|
||||
<line dasharray="10,2,2,2,2,2,2,2" repeat-start="0" stroke="#fcba5a" width="0.2" />
|
||||
</m>
|
||||
<m k="boundaryType" v="2">
|
||||
<!--标线-->
|
||||
<line stroke="#fcba5a" use="boundaryType"/>
|
||||
</m>
|
||||
<m k="boundaryType" v="3">
|
||||
<!--路牙-->
|
||||
<line dasharray="10,4" repeat-start="0" stroke="#fcba5a" width="0.2" />
|
||||
</m>
|
||||
<m k="boundaryType" v="4">
|
||||
<!--护栏-->
|
||||
<line dasharray="10,2,2,2" repeat-start="0" stroke="#fcba5a" width="0.2"/>
|
||||
</m>
|
||||
<m k="boundaryType" v="5">
|
||||
<!--墙-->
|
||||
<line stroke="#fcba5a" use="boundaryType"/>
|
||||
<line dasharray="10,5" stroke="#fcba5a" width="0.5" />
|
||||
</m>
|
||||
<m k="boundaryType" v="6">
|
||||
<!--道路面铺设边缘-->
|
||||
<line stroke="#fcba5a" use="boundaryType"/>
|
||||
<lineSymbol repeat-gap="32" repeat-start="0" symbol-height="32" src="assets:omdb/icon_2083_6.svg" />
|
||||
</m>
|
||||
<m k="boundaryType" v="7">
|
||||
<!--虚拟三角岛-->
|
||||
<line stroke="#fcba5a" use="boundaryType"/>
|
||||
<line src="assets:omdb/icon_2083_7.svg" symbol-height="12" symbol-width="12" symbol-percent="20" width="1" />
|
||||
</m>
|
||||
<m k="boundaryType" v="9">
|
||||
<!--杆状障碍物-->
|
||||
<line stroke="#fcba5a" use="boundaryType"/>
|
||||
<lineSymbol repeat-gap="16" repeat-start="12" symbol-height="24" symbol-width="8" src="assets:omdb/icon_2083_9.svg" />
|
||||
</m>
|
||||
</m>
|
||||
<!-- 车道边界类型 -->
|
||||
<m v="OMDB_LANE_MARK_BOUNDARYTYPE">
|
||||
@ -1775,6 +1816,22 @@
|
||||
</m>
|
||||
</m>
|
||||
</m>
|
||||
|
||||
<!--隧道-->
|
||||
<m v="OMDB_TUNNEL">
|
||||
<m k="formOfWay">
|
||||
<line dasharray="0.3,0.3" stroke="#d4237a" width="0.4" />
|
||||
</m>
|
||||
<m k="type" v="s_2_p">
|
||||
<symbol repeat="false" repeat-start="0" rotate="false"
|
||||
src="assets:omdb/icon_2202_0.svg" symbol-height="32" symbol-width="32"></symbol>
|
||||
</m>
|
||||
<m k="type" v="e_2_p">
|
||||
<symbol repeat="false" repeat-start="0" rotate="false"
|
||||
src="assets:omdb/icon_2202_1.svg" symbol-height="32" symbol-width="32"></symbol>
|
||||
</m>
|
||||
</m>
|
||||
|
||||
<!--道路方向-->
|
||||
<m v="OMDB_LINK_DIRECT">
|
||||
<m k="direct">
|
||||
@ -1808,20 +1865,7 @@
|
||||
<line use="s2e" />
|
||||
</m>
|
||||
</m>
|
||||
<!--隧道-->
|
||||
<m v="OMDB_TUNNEL">
|
||||
<m k="formOfWay">
|
||||
<line dasharray="24,8,4,2" stroke="#d4237a" width="2" />
|
||||
</m>
|
||||
<m k="type" v="s_2_p">
|
||||
<symbol repeat="false" repeat-start="0" rotate="false"
|
||||
src="assets:omdb/icon_2202_0.svg" symbol-height="69" symbol-width="69"></symbol>
|
||||
</m>
|
||||
<m k="type" v="e_2_p">
|
||||
<symbol repeat="false" repeat-start="0" rotate="false"
|
||||
src="assets:omdb/icon_2202_1.svg" symbol-height="69" symbol-width="69"></symbol>
|
||||
</m>
|
||||
</m>
|
||||
|
||||
<!--电子眼-->
|
||||
<m v="OMDB_ELECTRONICEYE">
|
||||
<!-- <m k="angle">-->
|
||||
|
1
collect-library/src/main/assets/omdb/icon_2083_0.svg
Normal file
1
collect-library/src/main/assets/omdb/icon_2083_0.svg
Normal file
@ -0,0 +1 @@
|
||||
<?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>
|
After Width: | Height: | Size: 900 B |
13
collect-library/src/main/assets/omdb/icon_2083_6.svg
Normal file
13
collect-library/src/main/assets/omdb/icon_2083_6.svg
Normal file
@ -0,0 +1,13 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="4" height="58.142" viewBox="0 0 4 58.142">
|
||||
<defs>
|
||||
<style>.a{fill:none;stroke:#ebb972;stroke-width:4px;}.b{opacity:0.001;}</style>
|
||||
</defs>
|
||||
<g transform="translate(-401.035 -35.964)">
|
||||
<g transform="translate(313.535 166.535) rotate(-90)">
|
||||
<line class="a" x2="29.071" transform="translate(101.5 89.5)" />
|
||||
</g>
|
||||
<g class="b" transform="translate(313.535 195.605) rotate(-90)">
|
||||
<line class="a" x2="29.071" transform="translate(101.5 89.5)" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 580 B |
8
collect-library/src/main/assets/omdb/icon_2083_7.svg
Normal file
8
collect-library/src/main/assets/omdb/icon_2083_7.svg
Normal file
@ -0,0 +1,8 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="69.82" height="37.822" viewBox="0 0 69.82 37.822">
|
||||
<defs>
|
||||
<style>.a{fill:#ebb972;}</style>
|
||||
</defs>
|
||||
<path class="a"
|
||||
d="M8597.151,19460.063a2.98,2.98,0,0,1-2.208-.877l-31.823-31.824a3,3,0,0,1,4.244-4.238l29.787,29.787,29.792-29.787a3,3,0,1,1,4.239,4.238l-31.819,31.824a2.991,2.991,0,0,1-2.122.879C8597.212,19460.064,8597.182,19460.064,8597.151,19460.063Z"
|
||||
transform="translate(-8562.241 -19422.242)" />
|
||||
</svg>
|
After Width: | Height: | Size: 490 B |
6
collect-library/src/main/assets/omdb/icon_2083_9.svg
Normal file
6
collect-library/src/main/assets/omdb/icon_2083_9.svg
Normal file
@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="48" viewBox="0 0 15 48">
|
||||
<defs>
|
||||
<style>.a{fill:#ebb972;}</style>
|
||||
</defs>
|
||||
<rect class="a" width="15" height="48" rx="7.5" />
|
||||
</svg>
|
After Width: | Height: | Size: 209 B |
@ -1 +1,13 @@
|
||||
<?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="1688716256005" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3069" width="32" height="32" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M512 192c-140.8 0-256 115.2-256 256v512l128-224V448c0-70.4 57.6-128 128-128s128 57.6 128 128v288l128 224V448c0-140.8-115.2-256-256-256z" fill="#FFB43E" p-id="3070"></path><path d="M448 736l-128 224h384L576 736z" fill="#FFB43E" p-id="3071"></path><path d="M512 64C300 64 128 236 128 448v512h64V448c0-176.8 143.2-320 320-320s320 143.2 320 320v512h64V448c0-212-172-384-384-384z" fill="#FFB43E" p-id="3072"></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="1688716256005" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="3069" width="32" height="32"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<path
|
||||
d="M512 192c-140.8 0-256 115.2-256 256v512l128-224V448c0-70.4 57.6-128 128-128s128 57.6 128 128v288l128 224V448c0-140.8-115.2-256-256-256z"
|
||||
fill="#FFB43E" p-id="3070"></path>
|
||||
<path d="M448 736l-128 224h384L576 736z" fill="#FFB43E" p-id="3071"></path>
|
||||
<path
|
||||
d="M512 64C300 64 128 236 128 448v512h64V448c0-176.8 143.2-320 320-320s320 143.2 320 320v512h64V448c0-212-172-384-384-384z"
|
||||
fill="#FFB43E" p-id="3072"></path>
|
||||
</svg>
|
Before Width: | Height: | Size: 747 B After Width: | Height: | Size: 808 B |
@ -36,6 +36,7 @@ import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
||||
import org.oscim.layers.tile.vector.labeling.LabelTileLoaderHook;
|
||||
import org.oscim.map.Map;
|
||||
import org.oscim.renderer.GLViewport;
|
||||
import org.oscim.scalebar.MapScaleBarLayer;
|
||||
import org.oscim.theme.IRenderTheme;
|
||||
import org.oscim.theme.ThemeLoader;
|
||||
import org.oscim.theme.VtmThemes;
|
||||
@ -198,6 +199,11 @@ public final class NIMapView extends RelativeLayout {
|
||||
*/
|
||||
private OnMapTouchListener touchListener;
|
||||
|
||||
/**
|
||||
* 比例尺控件
|
||||
*/
|
||||
private MapScaleBarLayer mapScaleBarLayer;
|
||||
|
||||
public NIMapView(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
@ -252,7 +258,7 @@ public final class NIMapView extends RelativeLayout {
|
||||
|
||||
// 增加比例尺图层
|
||||
NaviMapScaleBar naviMapScaleBar = new NaviMapScaleBar(getVtmMap());
|
||||
naviMapScaleBar.initScaleBarLayer(GLViewport.Position.BOTTOM_CENTER, 128, 5);
|
||||
mapScaleBarLayer = naviMapScaleBar.initScaleBarLayer(GLViewport.Position.BOTTOM_CENTER, 128, 5);
|
||||
|
||||
// if (gridLayer == null) {
|
||||
// gridLayer = new TileGridLayer(getVtmMap());
|
||||
@ -878,6 +884,21 @@ public final class NIMapView extends RelativeLayout {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置比例尺位置
|
||||
* @param position
|
||||
* @param xOffset
|
||||
* @param yOffset
|
||||
*/
|
||||
public void setScaleBarLayer(GLViewport.Position position, int xOffset, int yOffset){
|
||||
if(mapScaleBarLayer!=null&&mapView.map().layers().contains(mapScaleBarLayer)){
|
||||
mapView.map().layers().remove(mapScaleBarLayer);
|
||||
mapScaleBarLayer = null;
|
||||
}
|
||||
NaviMapScaleBar naviMapScaleBar = new NaviMapScaleBar(getVtmMap());
|
||||
mapScaleBarLayer = naviMapScaleBar.initScaleBarLayer(GLViewport.Position.BOTTOM_CENTER, xOffset, yOffset);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置是否显示缩放控件
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user