调整UI
调整道路属性面板
This commit is contained in:
parent
b6bbcad634
commit
59bc0f544b
@ -202,10 +202,10 @@ class MainActivity : BaseActivity() {
|
||||
viewModel.liveDataCenterPoint.observe(this) {
|
||||
binding.mainActivityGeometry.text = "经纬度:${
|
||||
BigDecimal(it.longitude).setScale(
|
||||
6,
|
||||
7,
|
||||
RoundingMode.HALF_UP
|
||||
)
|
||||
},${BigDecimal(it.latitude).setScale(6, RoundingMode.HALF_UP)}"
|
||||
},${BigDecimal(it.latitude).setScale(7, RoundingMode.HALF_UP)}"
|
||||
}
|
||||
|
||||
lifecycleScope.launch {
|
||||
|
@ -102,13 +102,7 @@ class MainViewModel @Inject constructor(
|
||||
mapController.mMapView.vtmMap.events.bind(Map.UpdateListener { e, mapPosition ->
|
||||
when (e) {
|
||||
Map.SCALE_EVENT, Map.MOVE_EVENT, Map.ROTATE_EVENT ->
|
||||
if (liveDataCenterPoint.value == null
|
||||
|| liveDataCenterPoint.value!!.x != mapPosition.x
|
||||
|| liveDataCenterPoint.value!!.y != mapPosition.y
|
||||
) {
|
||||
liveDataCenterPoint.value = mapPosition
|
||||
}
|
||||
|
||||
liveDataCenterPoint.value = mapPosition
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -177,6 +177,7 @@
|
||||
android:paddingLeft="9dp"
|
||||
android:text="经纬度:116.99388424,38.8403844"
|
||||
android:textSize="10sp"
|
||||
android:onClick="@{()->mainActivity.jumpPosition()}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/main_activity_middle_fragment" />
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user