This commit is contained in:
Alex Sytnyk 2018-09-18 20:09:39 +03:00
parent 122b036c45
commit 2fe7debf05

View file

@ -124,7 +124,6 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
private OsmandMapTileView map;
private LatLon mapCenter;
private int mapZoom;
private int origMarkerX;
private int origMarkerY;
private boolean customMapCenter;
@ -202,10 +201,6 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
origMarkerX = box.getCenterPixelX();
origMarkerY = box.getCenterPixelY();
}
mapZoom = menu.getMapZoom();
if (mapZoom == 0) {
mapZoom = map.getZoom();
}
// Left title button
final View leftTitleButtonView = view.findViewById(R.id.title_button_view);
@ -1247,13 +1242,8 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
super.onDestroyView();
if (!menu.isActive()) {
if (mapCenter != null) {
if (mapZoom == 0) {
mapZoom = map.getZoom();
}
//map.setLatLon(mapCenter.getLatitude(), mapCenter.getLongitude());
//map.setIntZoom(mapZoom);
AnimateDraggingMapThread thread = map.getAnimatedDraggingThread();
thread.startMoving(mapCenter.getLatitude(), mapCenter.getLongitude(), mapZoom, true);
thread.startMoving(mapCenter.getLatitude(), mapCenter.getLongitude(), map.getZoom(), true);
}
}
menu.setMapCenter(null);