Fix #7491
This commit is contained in:
parent
8235f31f7d
commit
53acf00f1a
1 changed files with 4 additions and 1 deletions
|
@ -1734,7 +1734,10 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
||||||
|
|
||||||
private void showOnMap(LatLon latLon, boolean updateCoords, boolean alreadyAdjusted, int zoom) {
|
private void showOnMap(LatLon latLon, boolean updateCoords, boolean alreadyAdjusted, int zoom) {
|
||||||
AnimateDraggingMapThread thread = map.getAnimatedDraggingThread();
|
AnimateDraggingMapThread thread = map.getAnimatedDraggingThread();
|
||||||
zoom = Math.min(zoom, thread.calculateMoveZoom(null, latLon.getLatitude(), latLon.getLongitude(), null));
|
int calculatedZoom = thread.calculateMoveZoom(null, latLon.getLatitude(), latLon.getLongitude(), null);
|
||||||
|
if (calculatedZoom > 0) {
|
||||||
|
zoom = Math.min(zoom, calculatedZoom);
|
||||||
|
}
|
||||||
LatLon calcLatLon = calculateCenterLatLon(latLon, zoom, updateCoords);
|
LatLon calcLatLon = calculateCenterLatLon(latLon, zoom, updateCoords);
|
||||||
if (updateCoords) {
|
if (updateCoords) {
|
||||||
mapCenter = calcLatLon;
|
mapCenter = calcLatLon;
|
||||||
|
|
Loading…
Reference in a new issue