diff --git a/OsmAnd/res/layout/map_hud_bottom.xml b/OsmAnd/res/layout/map_hud_bottom.xml index 623e73915a..9b8c5d8c54 100644 --- a/OsmAnd/res/layout/map_hud_bottom.xml +++ b/OsmAnd/res/layout/map_hud_bottom.xml @@ -51,7 +51,7 @@ android:id="@+id/map_transparency_layout" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="bottom|center" + android:layout_gravity="bottom|center_horizontal" android:layout_marginBottom="@dimen/map_button_size" android:orientation="horizontal"> diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index a2a9aef7f0..532ad62ce9 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -119,6 +119,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven private static final int LONG_KEYPRESS_DELAY = 500; private static final Log LOG = PlatformUtil.getLog(MapActivity.class); + public static final int MAX_ZOOM = 22; private static MapViewTrackingUtilities mapViewTrackingUtilities; private static MapContextMenu mapContextMenu = new MapContextMenu(); @@ -795,7 +796,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven final int newZoom = mapView.getZoom() + stp; final double zoomFrac = mapView.getZoomFractionalPart(); - if (newZoom > 22) { + if (newZoom > MAX_ZOOM) { Toast.makeText(this, R.string.edit_tilesource_maxzoom, Toast.LENGTH_SHORT).show(); //$NON-NLS-1$ return; } diff --git a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java index 505f407a65..03fbee639f 100644 --- a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java +++ b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java @@ -408,7 +408,7 @@ public class OsmandMapTileView implements IMapDownloaderCallback { public void setMainLayer(BaseMapLayer mainLayer) { this.mainLayer = mainLayer; int zoom = currentViewport.getZoom(); - maxZoom = mainLayer.getMaximumShownMapZoom(); + maxZoom = MapActivity.MAX_ZOOM; minZoom = mainLayer.getMinimumShownMapZoom() + 1; if (maxZoom < zoom) { zoom = maxZoom;