fix: 合并代码
This commit is contained in:
@@ -14,6 +14,11 @@ open class HadLinkDvoBean @JvmOverloads constructor(
|
||||
/**
|
||||
* (几何)加偏后
|
||||
*/
|
||||
var geometry: String = ""
|
||||
var geometry: String = "",
|
||||
|
||||
/**
|
||||
* 不作业原因
|
||||
*/
|
||||
var reason: String = ""
|
||||
|
||||
) : RealmObject()
|
||||
@@ -65,7 +65,7 @@ open class TaskBean @JvmOverloads constructor(
|
||||
var color: Int = 0xFF00AA
|
||||
) : RealmObject() {
|
||||
fun getDownLoadUrl(): String {
|
||||
return "${Constant.SERVER_ADDRESS}devcp/download?fileStr=$id"
|
||||
return "${Constant.SERVER_ADDRESS}devcp/downFile?fileStr=$id"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.navinfo.collect.library.map.handler
|
||||
import android.content.Context
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.navinfo.collect.library.map.NIMapView
|
||||
import org.oscim.core.BoundingBox
|
||||
import org.oscim.core.GeoPoint
|
||||
import org.oscim.core.MapPosition
|
||||
|
||||
@@ -68,4 +69,11 @@ open class AnimationHandler(context: AppCompatActivity, mapView: NIMapView) :
|
||||
mMapView.vtmMap.animator().animateTo(mapPosition)
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
fun animateToBox(maxX: Double, maxY: Double, minX: Double, minY: Double) {
|
||||
val box = BoundingBox(minY, minX, maxY, maxX)
|
||||
mMapView.vtmMap.animator().animateTo(box)
|
||||
}
|
||||
}
|
||||
@@ -16,17 +16,41 @@ import org.oscim.map.Map
|
||||
class OmdbTaskLinkLayer(map: Map, private var style: Style) : VectorLayer(map) {
|
||||
private val lineMap = HashMap<String, Drawable>()
|
||||
|
||||
private var selectDrawable: Drawable? = null
|
||||
|
||||
private val selectStyle =
|
||||
Style.builder().fillColor(Color.GREEN).strokeColor(Color.GREEN)
|
||||
.strokeWidth(10f).fixed(false).build()
|
||||
|
||||
|
||||
@Synchronized
|
||||
fun addLine(hadLinkDvoBean: HadLinkDvoBean, style: Style = this.style) {
|
||||
hadLinkDvoBean.let {
|
||||
if (!lineMap.containsKey(it.linkPid)) {
|
||||
// 添加geometry到图层上
|
||||
val lineDrawable = LineDrawable(GeometryTools.createGeometry(it.geometry), style)
|
||||
super.add(lineDrawable)
|
||||
lineMap[it.linkPid] = lineDrawable
|
||||
}
|
||||
if (!lineMap.containsKey(hadLinkDvoBean.linkPid)) {
|
||||
// 添加geometry到图层上
|
||||
val lineDrawable =
|
||||
LineDrawable(GeometryTools.createGeometry(hadLinkDvoBean.geometry), style)
|
||||
super.add(lineDrawable)
|
||||
lineMap[hadLinkDvoBean.linkPid] = lineDrawable
|
||||
}
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
fun showSelectLine(hadLinkDvoBean: HadLinkDvoBean) {
|
||||
if (selectDrawable != null) super.remove(selectDrawable)
|
||||
selectDrawable =
|
||||
LineDrawable(GeometryTools.createGeometry(hadLinkDvoBean.geometry), selectStyle)
|
||||
super.add(selectDrawable)
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
fun clearSelectLine() {
|
||||
if (selectDrawable != null) {
|
||||
super.remove(selectDrawable)
|
||||
selectDrawable = null
|
||||
}
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
fun addLineList(hadLinkDvoBeanList: List<HadLinkDvoBean>, style: Style = this.style) {
|
||||
hadLinkDvoBeanList.forEach {
|
||||
addLine(it, style)
|
||||
@@ -48,18 +72,17 @@ class OmdbTaskLinkLayer(map: Map, private var style: Style) : VectorLayer(map) {
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
fun setLineColor(color: Color) {
|
||||
this.style = Style.builder()
|
||||
.fillColor(color.toArgb())
|
||||
.fillAlpha(0.5f)
|
||||
.strokeColor(color.toArgb())
|
||||
.strokeWidth(8f)
|
||||
.fixed(true).build()
|
||||
this.style =
|
||||
Style.builder().fillColor(color.toArgb()).fillAlpha(0.5f).strokeColor(color.toArgb())
|
||||
.strokeWidth(8f).fixed(true).build()
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
fun removeAll() {
|
||||
for ((key, value) in lineMap) {
|
||||
super.remove(value)
|
||||
}
|
||||
lineMap.clear()
|
||||
clearSelectLine()
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="#64a0e6">
|
||||
<item>
|
||||
<selector >
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/shape_button_press"/>
|
||||
<item android:state_checked="true"
|
||||
android:drawable="@drawable/shape_button_press"/>
|
||||
<item android:state_selected="true"
|
||||
android:drawable="@drawable/shape_button_press"/>
|
||||
<item android:state_enabled="false"
|
||||
android:drawable="@drawable/shape_button_press"/>
|
||||
<item android:drawable="@drawable/shape_button_default"/>
|
||||
</selector>
|
||||
</item>
|
||||
</ripple>
|
||||
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="5dp"></corners>
|
||||
<padding
|
||||
android:bottom="@dimen/nimap_defalut_padding"
|
||||
android:left="@dimen/nimap_defalut_padding"
|
||||
android:right="@dimen/nimap_defalut_padding"
|
||||
android:top="@dimen/nimap_defalut_padding"></padding>
|
||||
<stroke android:width="0.2dp"
|
||||
android:color="#cfcfcf"></stroke>
|
||||
<solid android:color="#77cfcfcf"></solid>
|
||||
</shape>
|
||||
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="5dp"></corners>
|
||||
<padding
|
||||
android:bottom="@dimen/nimap_defalut_padding"
|
||||
android:left="@dimen/nimap_defalut_padding"
|
||||
android:right="@dimen/nimap_defalut_padding"
|
||||
android:top="@dimen/nimap_defalut_padding"></padding>
|
||||
<stroke android:width="0.2dp"
|
||||
android:color="#bcbcbc"></stroke>
|
||||
<solid android:color="#77bcbcbc"></solid>
|
||||
</shape>
|
||||
@@ -34,6 +34,7 @@
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginBottom="48dp"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/map_zoom_bg_xml"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/nimap_defalut_padding">
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.6 KiB |
@@ -1,20 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="transp">#00000000</color>
|
||||
<color name="purple_200">#FFBB86FC</color>
|
||||
<color name="purple_500">#FF6200EE</color>
|
||||
<color name="purple_700">#FF3700B3</color>
|
||||
<color name="teal_200">#FF03DAC5</color>
|
||||
<color name="teal_700">#FF018786</color>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="transparent">#00FFFFFF</color>
|
||||
<color name="background_light">#ffffffff</color>
|
||||
<color name="draw_line_blue1_color" comment="线数据样式">#028FFF</color>
|
||||
<color name="draw_line_blue2_color" comment="线数据样式">#4E55AF</color>
|
||||
<color name="draw_line_red_color" comment="线数据样式">#FFF6565D</color>
|
||||
<color name="draw_line_color" comment="地图绘制线颜色">#4E55AF</color>
|
||||
<color name="default_blue" comment="应用主要色调">#1890ff</color>
|
||||
<color name="default_red" comment="应用主要色调">#F03736</color>
|
||||
|
||||
</resources>
|
||||
@@ -1,16 +1,3 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.NavinfoMap" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_500</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_700</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user