merge code
This commit is contained in:
parent
af4baf80b5
commit
8d7c6036f1
@ -424,6 +424,7 @@ class MainActivity : BaseActivity() {
|
|||||||
editText.text = null
|
editText.text = null
|
||||||
//清理已绘制线
|
//清理已绘制线
|
||||||
mapController.lineHandler.removeLine()
|
mapController.lineHandler.removeLine()
|
||||||
|
mapController.markerHandle.removeMarker("location")
|
||||||
when (p0.position) {
|
when (p0.position) {
|
||||||
0 -> editText.hint = "请输入LinkPid例如:12345678"
|
0 -> editText.hint = "请输入LinkPid例如:12345678"
|
||||||
1 -> editText.hint = "请输入MarkId例如:123456789"
|
1 -> editText.hint = "请输入MarkId例如:123456789"
|
||||||
|
@ -583,6 +583,7 @@ class MainViewModel @Inject constructor(
|
|||||||
* 点击我的位置,回到我的位置
|
* 点击我的位置,回到我的位置
|
||||||
*/
|
*/
|
||||||
fun onClickLocationButton() {
|
fun onClickLocationButton() {
|
||||||
|
mapController.markerHandle.removeMarker("location")
|
||||||
mapController.locationLayerHandler.animateToCurrentPosition()
|
mapController.locationLayerHandler.animateToCurrentPosition()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1113,6 +1114,7 @@ class MainViewModel @Inject constructor(
|
|||||||
val x = parts[0].toDouble()
|
val x = parts[0].toDouble()
|
||||||
val y = parts[1].toDouble()
|
val y = parts[1].toDouble()
|
||||||
mapController.animationHandler.animationByLatLon(y, x)
|
mapController.animationHandler.animationByLatLon(y, x)
|
||||||
|
mapController.markerHandle.addMarker(GeoPoint(y,x),"location")
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(mapController.mMapView.context, "输入格式不正确", Toast.LENGTH_SHORT).show()
|
Toast.makeText(mapController.mMapView.context, "输入格式不正确", Toast.LENGTH_SHORT).show()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user