merge code

This commit is contained in:
qiji4215 2023-08-10 13:43:36 +08:00
parent af4baf80b5
commit 8d7c6036f1
2 changed files with 3 additions and 0 deletions

View File

@ -424,6 +424,7 @@ class MainActivity : BaseActivity() {
editText.text = null
//清理已绘制线
mapController.lineHandler.removeLine()
mapController.markerHandle.removeMarker("location")
when (p0.position) {
0 -> editText.hint = "请输入LinkPid例如12345678"
1 -> editText.hint = "请输入MarkId例如123456789"

View File

@ -583,6 +583,7 @@ class MainViewModel @Inject constructor(
* 点击我的位置回到我的位置
*/
fun onClickLocationButton() {
mapController.markerHandle.removeMarker("location")
mapController.locationLayerHandler.animateToCurrentPosition()
}
@ -1113,6 +1114,7 @@ class MainViewModel @Inject constructor(
val x = parts[0].toDouble()
val y = parts[1].toDouble()
mapController.animationHandler.animationByLatLon(y, x)
mapController.markerHandle.addMarker(GeoPoint(y,x),"location")
dialog.dismiss()
} else {
Toast.makeText(mapController.mMapView.context, "输入格式不正确", Toast.LENGTH_SHORT).show()