OeffiMapView: Define sane minimum and maximum zoom levels.

This commit is contained in:
Andreas Schildbach 2018-11-09 15:27:37 +01:00
parent aa9856ae3f
commit 64e686e64e
2 changed files with 4 additions and 0 deletions

View file

@ -47,6 +47,8 @@ public class Constants {
public static final int MAX_NUMBER_OF_STOPS = 150;
public static final int MAX_HISTORY_ENTRIES = 50;
public static final float BEARING_ACCURACY_THRESHOLD = 0.5f;
public static final double MAP_MIN_ZOOM_LEVEL = 3.0;
public static final double MAP_MAX_ZOOM_LEVEL = 18.0;
public static final double INITIAL_MAP_ZOOM_LEVEL_NETWORK = 12.0;
public static final double INITIAL_MAP_ZOOM_LEVEL = 17.0;
public static final int MAX_TRIES_ON_IO_PROBLEM = 2;

View file

@ -111,6 +111,8 @@ public class OeffiMapView extends MapView {
setMultiTouchControls(true);
setTilesScaledToDpi(true);
getController().setZoom(Constants.INITIAL_MAP_ZOOM_LEVEL);
setMinZoomLevel(Constants.MAP_MIN_ZOOM_LEVEL);
setMaxZoomLevel(Constants.MAP_MAX_ZOOM_LEVEL);
getOverlays().add(new Overlay() {
@Override