fix(location): instant viewport centering except on real location button click
This commit is contained in:
1 parent
6ffa7d8108
commit
32fa4a611a
1 file changed
+4
-4
@@ -381,7 +381,7 @@ fun LocationScreen(
|
||||
String.format(Locale.getDefault(), "%.5f, %.5f", AppPreferences.mockLatitude, AppPreferences.mockLongitude)
|
||||
}
|
||||
currentMarker?.title = locationName
|
||||
mapViewRef?.controller?.animateTo(p)
|
||||
mapViewRef?.controller?.setCenter(p)
|
||||
mapViewRef?.invalidate()
|
||||
}
|
||||
} else if (isVisible) {
|
||||
@@ -393,7 +393,7 @@ fun LocationScreen(
|
||||
val p = GeoPoint(gcj[0], gcj[1])
|
||||
currentGeoPoint = p
|
||||
currentMarker?.position = p
|
||||
mapViewRef?.controller?.animateTo(p)
|
||||
mapViewRef?.controller?.setCenter(p)
|
||||
mapViewRef?.invalidate()
|
||||
coroutineScope.launch {
|
||||
val resolved = LocationResolver.resolveLocationName(context, realWgsLat, realWgsLng)
|
||||
@@ -502,7 +502,7 @@ fun LocationScreen(
|
||||
|
||||
currentGeoPoint = mapPoint
|
||||
currentMarker?.position = mapPoint
|
||||
mapViewRef?.controller?.animateTo(mapPoint)
|
||||
mapViewRef?.controller?.setCenter(mapPoint)
|
||||
mapViewRef?.invalidate()
|
||||
|
||||
locationName = result.name
|
||||
@@ -1304,7 +1304,7 @@ fun LocationScreen(
|
||||
pointOnMap = targetPoint,
|
||||
isUserManual = true,
|
||||
centerMap = true,
|
||||
animate = true
|
||||
animate = false
|
||||
)
|
||||
locationName = favorite.name
|
||||
showFavoritesScreen = false
|
||||
|
||||
Reference in new issue
Block a user