This commit is contained in:
max-klaus 2019-09-01 10:22:28 +03:00
parent 8235f31f7d
commit 53acf00f1a

View file

@ -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;