Fix #6411
This commit is contained in:
parent
56e6c31bc1
commit
d738408157
2 changed files with 4 additions and 7 deletions
|
@ -918,17 +918,13 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
|||
if (map.isZooming() && map.hasCustomMapRatio()) {
|
||||
getMapActivity().changeZoom(2, System.currentTimeMillis());
|
||||
} else {
|
||||
if (!map.hasCustomMapRatio()) {
|
||||
//setCustomMapRatio();
|
||||
}
|
||||
setCustomMapRatio();
|
||||
getMapActivity().changeZoom(1, System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
|
||||
public void doZoomOut() {
|
||||
if (!map.hasCustomMapRatio()) {
|
||||
//setCustomMapRatio();
|
||||
}
|
||||
setCustomMapRatio();
|
||||
getMapActivity().changeZoom(-1, System.currentTimeMillis());
|
||||
}
|
||||
|
||||
|
@ -1250,6 +1246,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
|||
public void onPause() {
|
||||
|
||||
if (view != null) {
|
||||
restoreCustomMapRatio();
|
||||
ViewParent parent = view.getParent();
|
||||
if (parent != null && containerLayoutListener != null) {
|
||||
((View) parent).removeOnLayoutChangeListener(containerLayoutListener);
|
||||
|
|
|
@ -511,7 +511,7 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
|
|||
ry -= 0.35;
|
||||
}
|
||||
box.setCenterLocation(rx, ry);
|
||||
LatLon screenCenter = box.getLatLonFromPixel(box.getPixWidth() / 2, box.getPixHeight() / 2);
|
||||
LatLon screenCenter = box.getLatLonFromPixel(box.getPixWidth() / 2f, box.getPixHeight() / 2f);
|
||||
mapRatioX = 0;
|
||||
mapRatioY = 0;
|
||||
setLatLon(screenCenter.getLatitude(), screenCenter.getLongitude());
|
||||
|
|
Loading…
Reference in a new issue