Fix #6549
This commit is contained in:
parent
5097b75c70
commit
0077c78a78
1 changed files with 16 additions and 3 deletions
|
@ -937,10 +937,17 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
|||
public void doZoomIn() {
|
||||
MapActivity mapActivity = getMapActivity();
|
||||
if (mapActivity != null) {
|
||||
if (map.isZooming() && map.hasCustomMapRatio()) {
|
||||
RotatedTileBox tb = map.getCurrentRotatedTileBox().copy();
|
||||
boolean containsLatLon = tb.containsLatLon(menu.getLatLon());
|
||||
if (!containsLatLon) {
|
||||
restoreCustomMapRatio();
|
||||
}
|
||||
if (map.isZooming() && (map.hasCustomMapRatio() || !containsLatLon)) {
|
||||
mapActivity.changeZoom(2, System.currentTimeMillis());
|
||||
} else {
|
||||
setCustomMapRatio();
|
||||
if (containsLatLon) {
|
||||
setCustomMapRatio();
|
||||
}
|
||||
mapActivity.changeZoom(1, System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
|
@ -949,7 +956,13 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
|||
public void doZoomOut() {
|
||||
MapActivity mapActivity = getMapActivity();
|
||||
if (mapActivity != null) {
|
||||
setCustomMapRatio();
|
||||
RotatedTileBox tb = map.getCurrentRotatedTileBox().copy();
|
||||
boolean containsLatLon = tb.containsLatLon(menu.getLatLon());
|
||||
if (containsLatLon) {
|
||||
setCustomMapRatio();
|
||||
} else {
|
||||
restoreCustomMapRatio();
|
||||
}
|
||||
mapActivity.changeZoom(-1, System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue