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

This commit is contained in:
squallzhjch 2023-08-17 10:10:09 +08:00
commit 53e5154c36
12 changed files with 89 additions and 23 deletions

View File

@ -416,6 +416,9 @@ class MainActivity : BaseActivity() {
supportFragmentManager.beginTransaction()
.add(R.id.console_fragment_layout, ConsoleFragment()).commit()
}
binding.mainActivityCloseLine.isSelected = viewModel.isHighRoad()
initMeasuringTool()
}
@ -675,6 +678,13 @@ class MainActivity : BaseActivity() {
viewModel.click2Dor3D()
}
/**
* 刷新地图
*/
fun refrushOnclick(view: View) {
mapController.layerManagerHandler.updateOMDBVectorTileLayer()
}
/**
* zoomin
*/
@ -754,6 +764,16 @@ class MainActivity : BaseActivity() {
binding.mainActivitySelectLine.isSelected = viewModel.isSelectRoad()
}
/**
* 点击线高亮
*/
fun openOrCloseLineOnclick() {
viewModel.setHighRoad(!viewModel.isHighRoad())
binding.mainActivityCloseLine.isSelected = viewModel.isHighRoad()
mapController.lineHandler.taskMarkerLayerEnable(viewModel.isHighRoad())
}
/**
* 点击线选择
*/
@ -990,7 +1010,7 @@ class MainActivity : BaseActivity() {
*/
private fun showMainActivityBottomSheetGroup() {
binding.mainActivityBottomSheetGroup.visibility = View.VISIBLE
mapController.mMapView.setScaleBarLayer(GLViewport.Position.BOTTOM_CENTER, 10, 60)
mapController.mMapView.setScaleBarLayer(GLViewport.Position.BOTTOM_CENTER, 128, 60)
mapController.mMapView.vtmMap.animator().animateTo(
GeoPoint(
mapController.mMapView.vtmMap.mapPosition.geoPoint.latitude,
@ -1004,7 +1024,7 @@ class MainActivity : BaseActivity() {
*/
private fun hideMainActivityBottomSheetGroup() {
binding.mainActivityBottomSheetGroup.visibility = View.GONE
mapController.mMapView.setScaleBarLayer(GLViewport.Position.BOTTOM_CENTER, 10, 0)
mapController.mMapView.setScaleBarLayer(GLViewport.Position.BOTTOM_CENTER, 128, 0)
mapController.mMapView.vtmMap.animator().animateTo(
GeoPoint(
mapController.mMapView.vtmMap.mapPosition.geoPoint.latitude,

View File

@ -156,6 +156,11 @@ class MainViewModel @Inject constructor(
*/
private var bSelectRoad = false
/**
* 是不是高亮任务线
*/
private var bHighRoad = true
/**
* 是不是选择轨迹点
*/
@ -489,7 +494,7 @@ class MainViewModel @Inject constructor(
val linkList = realmOperateHelper.queryLink(point = point)
/* val linkList = realmOperateHelper.queryLine(
/*val linkList = realmOperateHelper.queryLine(
point = point,
)
@ -832,6 +837,21 @@ class MainViewModel @Inject constructor(
return bSelectRoad
}
/**
* 开启线高亮
*/
fun setHighRoad(select: Boolean) {
bHighRoad = select
}
/**
* 是否开启线高亮
*/
fun isHighRoad(): Boolean {
return bHighRoad
}
/**
* 开启轨迹选择
*/

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/icon_hide_line" android:state_selected="true"></item>
<item android:drawable="@drawable/icon_high_line" />
</selector>

View File

@ -245,6 +245,15 @@
app:layout_constraintBottom_toTopOf="@id/main_activity_bottom_sheet"
app:layout_constraintLeft_toLeftOf="@id/main_activity_top_sign_recyclerview" />
<ImageButton
android:id="@+id/main_activity_map_update"
style="@style/zoom_btns_style"
android:layout_marginBottom="12dp"
android:onClick="@{(view)->mainActivity.refrushOnclick(view)}"
android:src="@drawable/icon_map_refrush"
app:layout_constraintBottom_toTopOf="@id/main_activity_zoom_in"
app:layout_constraintRight_toRightOf="@id/main_activity_zoom_in" />
<ImageButton
android:id="@+id/main_activity_zoom_out"
@ -276,8 +285,8 @@
android:layout_marginBottom="12dp"
android:onClick="@{()->viewModel.onClickLocationButton()}"
android:src="@drawable/icon_location"
app:layout_constraintBottom_toTopOf="@id/main_activity_zoom_in"
app:layout_constraintRight_toRightOf="@id/main_activity_zoom_in" />
app:layout_constraintBottom_toTopOf="@id/main_activity_map_update"
app:layout_constraintRight_toRightOf="@id/main_activity_map_update" />
<ImageButton
android:id="@+id/main_activity_add_new"
@ -307,17 +316,27 @@
app:layout_constraintBottom_toTopOf="@id/main_activity_voice"
app:layout_constraintRight_toRightOf="@id/main_activity_voice" />
<ImageButton
android:id="@+id/main_activity_close_line"
style="@style/zoom_btns_style"
android:layout_marginBottom="12dp"
android:background="@drawable/selector_road_line_bg"
android:onClick="@{()->mainActivity.openOrCloseLineOnclick()}"
android:src="@drawable/selector_high_road_line_src"
app:layout_constraintBottom_toTopOf="@id/main_activity_select_line"
app:layout_constraintRight_toRightOf="@id/main_activity_select_line" />
<androidx.constraintlayout.widget.Group
android:id="@+id/main_activity_right_visibility_buttons_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="main_activity_select_line,main_activity_voice,main_activity_add_new" />
app:constraint_referenced_ids="main_activity_close_line,main_activity_select_line,main_activity_voice,main_activity_add_new" />
<androidx.constraintlayout.widget.Group
android:id="@+id/main_activity_right_visibility_buttons_group2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="main_activity_select_line,main_activity_voice,main_activity_add_new,main_activity_zoom_in,main_activity_zoom_out,main_activity_geometry,main_activity_location" />
app:constraint_referenced_ids="main_activity_close_line,main_activity_select_line,main_activity_voice,main_activity_add_new,main_activity_map_update,main_activity_zoom_in,main_activity_zoom_out,main_activity_geometry,main_activity_location" />
<fragment
android:id="@+id/main_activity_middle_fragment"

View File

@ -2068,12 +2068,16 @@
</m>
</m>
</m>
<m k="boundaryType" v="3|4|5|7">
<m k="boundaryType" v="3">
<symbol repeat="true" repeat-gap="6" repeat-start="0" src="assets:omdb/icon_2013_3.svg" symbol-width="12" symbol-height="12"></symbol>
</m>
<m k="boundaryType" v="4">
<symbol repeat-gap="16" repeat="true" repeat-start="0" src="assets:omdb/icon_2013_4.svg" symbol-width="32" symbol-height="56"></symbol>
</m>
<m k="boundaryType" v="5|7">
<line stroke="#ffffff" use="boundaryType" />
</m>
<!-- <m k="boundaryType" v="0|3|4|5|6|7|8|9">
<line stroke="#ffffff" use="boundaryType" />
</m>-->
</m>
<!-- 道路属性 -->
@ -2179,16 +2183,7 @@
<!-- 环岛 -->
<m v="OMDB_ROUNDABOUT">
<line stroke="#fcba5a" width="0.5" />
<m k="type" v="s_2_p">
<symbol repeat="false" repeat-start="0" rotate="false" repeat-gap="0"
src="assets:omdb/icon_2204_0.svg" symbol-height="56" symbol-width="56"></symbol>
</m>
<m k="type" v="e_2_p">
<symbol repeat="false" repeat-start="0" rotate="false" repeat-gap="0"
src="assets:omdb/icon_2204_0.svg" symbol-height="56" symbol-width="56"></symbol>
</m>
<symbol repeat="true" repeat-start="0" repeat-gap="32" src="assets:omdb/icon_2204_0.svg"></symbol>
</m>
<!--常规点限速-->

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" width="49.7" height="24" viewBox="0 0 49.7 24"><defs><style>.f{fill:rgba(155,155,155,0);}.g{fill:none;}.h{fill:#050505;}.i{fill:#fff;}</style></defs><g id="c"><g><path id="d" class="f" d="M0,0H49.7V24H0V0Z"/><polygon class="g" points="0 0 0 12 0 12 0 24 49.7 24 49.7 12 49.7 12 49.7 0 0 0"/><g><rect id="e" class="i" x="0" y="11.6" width="49.7" height="12.4"/><polygon class="h" points="8.3 11.6 3.8 11.6 11.1 24 14.4 22.1 8.3 11.6 8.3 11.6"/><polygon class="h" points="24.8 11.6 20.4 11.6 27.6 24 31 22.1 24.8 11.6 24.8 11.6"/><polygon class="h" points="41.4 11.6 36.9 11.6 44.2 24 47.5 22.1 41.4 11.6 41.4 11.6"/></g><polygon class="i" points="49.7 11 0 11 0 12.2 49.7 12.2 49.7 11 49.7 11"/></g></g></svg>

After

Width:  |  Height:  |  Size: 793 B

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" width="107.5" height="105.4" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 107.5 105.4"><defs><style>.p{fill:url(#j);}.q{fill:url(#g);}.r{fill:url(#m);}.s{fill:url(#h);}.t{fill:url(#i);}.u{fill:url(#o);}.v{fill:url(#k);}.w{fill:url(#n);}.x{fill:url(#l);}.y{fill:url(#f);}.z{fill:url(#d);}.aa{fill:url(#e);}.ab{fill:none;}</style><linearGradient id="d" x1="48.3" y1="64.9" x2="49.7" y2="64.9" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#231815"/><stop offset="0" stop-color="#372d2a"/><stop offset="0" stop-color="#655d5b"/><stop offset=".1" stop-color="#8e8987"/><stop offset=".2" stop-color="#b1adac"/><stop offset=".2" stop-color="#cdcbca"/><stop offset=".3" stop-color="#e3e2e1"/><stop offset=".3" stop-color="#f2f2f2"/><stop offset=".4" stop-color="#fcfbfb"/><stop offset=".5" stop-color="#fff"/><stop offset=".7" stop-color="#fcfcfc"/><stop offset=".7" stop-color="#f5f5f5"/><stop offset=".8" stop-color="#e9e8e8"/><stop offset=".8" stop-color="#d8d6d6"/><stop offset=".9" stop-color="#c2bfbe"/><stop offset=".9" stop-color="#a6a2a1"/><stop offset=".9" stop-color="#85807e"/><stop offset="1" stop-color="#605957"/><stop offset="1" stop-color="#3a312f"/><stop offset="1" stop-color="#453d3b"/><stop offset="1" stop-color="#65605f"/><stop offset="1" stop-color="#7f7c7b"/><stop offset="1" stop-color="#91908f"/><stop offset="1" stop-color="#9c9c9b"/><stop offset="1" stop-color="#a0a0a0"/></linearGradient><linearGradient id="e" x1="38.4" x2="39.8" xlink:href="#d"/><linearGradient id="f" x1="68.2" x2="69.6" xlink:href="#d"/><linearGradient id="g" x1="58.3" x2="59.6" xlink:href="#d"/><linearGradient id="h" x1="101.9" y1="64.9" x2="103.3" y2="64.9" xlink:href="#d"/><linearGradient id="i" x1="92" y1="64.9" x2="93.3" y2="64.9" xlink:href="#d"/><linearGradient id="j" x1="14.4" y1="64.9" x2="15.8" y2="64.9" xlink:href="#d"/><linearGradient id="k" x1="4.5" y1="64.9" x2="5.8" y2="64.9" xlink:href="#d"/><linearGradient id="l" x1="344.8" y1="-9.2" x2="346.1" y2="-9.2" gradientTransform="translate(-291.7 66.7)" xlink:href="#d"/><linearGradient id="m" x1="330.1" y1="-9.2" x2="331.4" y2="-9.2" gradientTransform="translate(-277 81.4)" xlink:href="#d"/><linearGradient id="n" x1="395.3" y1="258.8" x2="400.1" y2="258.8" gradientTransform="translate(-370.6 -193.9)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#989898"/><stop offset="0" stop-color="#a3a3a3"/><stop offset=".1" stop-color="#c4c5c5"/><stop offset=".2" stop-color="#d8d9d9"/><stop offset=".3" stop-color="#e0e1e1"/><stop offset=".4" stop-color="#dbdcdc"/><stop offset=".5" stop-color="#cccece"/><stop offset=".6" stop-color="#b5b6b7"/><stop offset=".7" stop-color="#949697"/><stop offset=".8" stop-color="#6a6c6f"/><stop offset=".8" stop-color="#3f4246"/><stop offset="1" stop-color="#404247"/><stop offset="1" stop-color="#43434a"/></linearGradient><linearGradient id="o" x1="78.5" y1="64.9" x2="83.3" y2="64.9" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#n"/></defs><g id="c"><g><rect class="ab" width="107.5" height="105.4"/><g><g><path class="z" d="M48.6,57.4h.9c.1,0,.2,.1,.2,.2v14.6c0,0,0,.1-.1,.1h-1.2s0,0,0,0v-14.7c0-.1,.1-.2,.2-.2Z"/><path class="aa" d="M38.6,57.4h.9c.1,0,.2,.1,.2,.2v14.6c0,0,0,.1-.1,.1h-1.2s0,0,0,0v-14.7c0-.1,.1-.2,.2-.2Z"/><path class="y" d="M68.4,57.4h.9c.1,0,.2,.1,.2,.2v14.6c0,0,0,.1-.1,.1h-1.2s0,0,0,0v-14.7c0-.1,.1-.2,.2-.2Z"/><path class="q" d="M58.5,57.4h.9c.1,0,.2,.1,.2,.2v14.6c0,0,0,.1-.1,.1h-1.2s0,0,0,0v-14.7c0-.1,.1-.2,.2-.2Z"/><path class="s" d="M102.1,57.4h.9c.1,0,.2,.1,.2,.2v14.6c0,0,0,.1-.1,.1h-1.2s0,0,0,0v-14.7c0-.1,.1-.2,.2-.2Z"/><path class="t" d="M92.2,57.4h.9c.1,0,.2,.1,.2,.2v14.6c0,0,0,.1-.1,.1h-1.2s0,0,0,0v-14.7c0-.1,.1-.2,.2-.2Z"/><path class="p" d="M14.6,57.4h.9c.1,0,.2,.1,.2,.2v14.6c0,0,0,.1-.1,.1h-1.2s0,0,0,0v-14.7c0-.1,.1-.2,.2-.2Z"/><path class="v" d="M4.7,57.4h.9c.1,0,.2,.1,.2,.2v14.6c0,0,0,.1-.1,.1h-1.2s0,0,0,0v-14.7c0-.1,.1-.2,.2-.2Z"/><path class="x" d="M53.3,3.8h.9c.1,0,.2,.1,.2,.2V111.2c0,0,0,.1-.1,.1h-1.1s0,0,0,0V4c0-.1,.1-.2,.2-.2Z" transform="translate(-3.8 111.3) rotate(-90)"/><path class="r" d="M53.3,18.5h.9c.1,0,.2,.1,.2,.2V125.9c0,0,0,.1-.1,.1h-1.1s0,0,0,0V18.7c0-.1,.1-.2,.2-.2Z" transform="translate(-18.5 126) rotate(-90)"/></g><path class="w" d="M25.4,52.7h3.1c.6,0,1.1,.5,1.1,1.1v22.3c0,.5-.4,1-1,1h-3.4c-.5,0-.9-.4-.9-.9v-22.3c0-.6,.5-1.1,1.1-1.1Z" transform="translate(54 129.8) rotate(180)"/><path class="u" d="M79.2,52.7h3.1c.6,0,1.1,.5,1.1,1.1v22.3c0,.5-.4,1-1,1h-3.4c-.5,0-.9-.4-.9-.9v-22.3c0-.6,.5-1.1,1.1-1.1Z"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" width="131.3" height="131.3" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 131.3 131.3"><defs><style>.i{fill:url(#g);}.j{fill:url(#h);stroke:#8b9fae;stroke-miterlimit:10;stroke-width:1.1px;}.k{fill:#fff;}.l{fill:#1566e8;}.m{fill:#535a60;}.n{fill:none;opacity:0;}.o{fill:#262d34;isolation:isolate;opacity:.2;}</style><linearGradient id="g" x1="63.4" y1="374.1" x2="68.2" y2="374.1" gradientTransform="translate(0 428.8) scale(1 -1)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#989898"/><stop offset="0" stop-color="#a3a3a3"/><stop offset="0" stop-color="#c4c5c5"/><stop offset=".2" stop-color="#d8d9d9"/><stop offset=".3" stop-color="#e0e1e1"/><stop offset=".4" stop-color="#dbdcdc"/><stop offset=".5" stop-color="#cccece"/><stop offset=".6" stop-color="#b5b6b7"/><stop offset=".7" stop-color="#949697"/><stop offset=".8" stop-color="#6a6c6f"/><stop offset=".8" stop-color="#3f4246"/><stop offset="1" stop-color="#404247"/><stop offset="1" stop-color="#43434a"/></linearGradient><linearGradient id="h" x1="41.1" y1="402.1" x2="90.2" y2="402.1" gradientTransform="translate(0 428.8) scale(1 -1)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#afbacb"/><stop offset="0" 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 id="d"><g><rect class="n" width="131.3" height="131.3"/><g><ellipse id="e" class="o" cx="65.7" cy="66.2" rx="14.4" ry="3.7"/><ellipse id="f" class="m" cx="65.7" cy="66.2" rx="7.5" ry="3"/><path class="i" d="M65.7,42.6h0c1.4,0,2.6,1.2,2.6,2.6v19.2c0,1.4-1.1,2.5-2.5,2.5h-.3c-1.4,0-2.5-1.1-2.5-2.5v-19.3c0-1.4,1.2-2.6,2.6-2.6h.1Z"/><path class="j" d="M65.6,1h0c13.5,0,24.5,11,24.5,24.5v2.4c0,13.5-11,24.5-24.5,24.5h0c-13.5,0-24.5-11-24.5-24.5v-2.4c0-13.5,11-24.5,24.5-24.5Z"/><path class="l" d="M65.7,3.3h0c13.3,0,24,10.7,24,24v.5c0,13.3-10.7,24-24,24h0c-13.3,0-24-10.7-24-24v-.5c0-13.3,10.7-24,24-24Z"/><g><path class="k" d="M55,10.3l3.5-1.7-1.4,3.9,.3,.8c8.4-3.6,15-2.4,21,3.9l-2.3,1.8c-4.8-5.2-10.8-6.1-17.4-3l.4,1,4.2,.9-3.5,2.1-7.9-2.6,3-7.1h.1Z"/><path class="k" d="M55.2,46l-3.2-2.2,4.1-.7,.5-.7c-7.2-5.4-9.5-11.7-7-19.9l2.7,1c-2.1,6.8,0,12.3,6.1,16.4l.6-.8-1.2-4.1,3.6,1.9,1.7,8.1-7.7,.9h-.2Z"/><path class="k" d="M86.5,27.8l-.3,3.9-2.7-3.2h-.8c-1,8.9-5.2,14-13.7,16l-.5-2.8c7-1.7,10.8-6.3,11.2-13.6h-1l-2.8,3.1-.2-4.1,6.1-5.5,4.8,6.1h0Z"/></g><g><path class="k" d="M60.6,30.4v.4c-.5,0-2.6,.4-3.1,.5v-1.1l1-.2v-1.8h-.8v-1.1h.8v-1.5h-.9v-1.1h2.9v1.1h-.9v1.5h.8v1.1h-.8v1.6l.9-.2v.7h0Zm4.3-.1c-.5-.7-1.2-1.6-1.7-2.2v4h-1.1v-3.5c-.3,.5-.7,1-1.2,1.4l-.8-.9c1-1,1.7-2.2,2.3-3.5h-1.6v-1.2h4.4v1.2h-1.6c-.2,.5-.4,1-.6,1.4h.3v.3l.3-.3c.6,.5,1.6,1.6,2.1,2.3l-.7,.9h-.1Z"/><path class="k" d="M71.8,31.2h-5.1v-2.2h1.1v1.2h1v-1.4h1.1v1.4h.9v-1.2h1.1v2.2h0Zm2-3.4s0,2.8,0,3c0,1-.3,1.3-1.1,1.3h-.9l-.3-.8h.7c.4,0,.4-.3,.4-.8v-1.9h-5.4v-4h1.7c0-.2,.2-.5,.3-.7h1.2c0,.3,0,.5-.2,.7h2.8v1.7c0,1-.4,1.1-1.2,1.2h-.6l-.3-.8h.5c.4,0,.5-.2,.5-.4v-.7h-2.4c.4,.3,.8,.6,1.1,.9l-.6,.8c-.4-.4-.9-.8-1.3-1.1l.5-.6h-.8v2.1h5.5Z"/></g></g></g></g></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="36" viewBox="0 0 64 36"><defs><style>.a,.c{fill:#fff;}.a{stroke:#1566e8;}.b{fill:#1566e8;}.c{font-size:23px;font-family:PingFangSC-Regular, PingFang SC;}.d{stroke:none;}.e{fill:none;}</style></defs><g transform="translate(-301 -1485)"><g class="a" transform="translate(301 1485)"><rect class="d" width="64" height="36" rx="5"/><rect class="e" x="0.5" y="0.5" width="63" height="35" rx="4.5"/></g><rect class="b" width="58" height="30" rx="5" transform="translate(304 1488)"/><text class="c" transform="translate(310 1511)"><tspan x="0" y="0">环岛</tspan></text></g></svg>

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 632 B

View File

@ -60,7 +60,7 @@ class LineHandler(context: AppCompatActivity, mapView: NIMapView) : BaseHandler(
.fillColor(context.resources.getColor(R.color.draw_line_red_color))
.fillAlpha(0.5f)
.strokeColor(context.resources.getColor(R.color.draw_line_red_color))
.strokeWidth(2f)
.strokeWidth(3f)
.fixed(true).build()
)
addLayer(layer, NIMapView.LAYER_GROUPS.VECTOR)
@ -209,6 +209,11 @@ class LineHandler(context: AppCompatActivity, mapView: NIMapView) : BaseHandler(
omdbTaskLinkLayer.update()
mMapView.vtmMap.updateMap(true)
}
fun taskMarkerLayerEnable(boolean: Boolean){
omdbTaskLinkLayer.isEnabled = boolean
mMapView.vtmMap.updateMap(true)
}
}
interface OnTaskLinkItemClickListener : BaseClickListener {