From f5fdf6ac0fa44d641dfc0ea44fe1725a911c0af1 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Fri, 2 Sep 2016 19:59:15 +0200 Subject: [PATCH] Update search display --- OsmAnd/src/net/osmand/plus/activities/MapActivity.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index 7611df96e3..f210008352 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -128,6 +128,8 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven private static final int SHOW_POSITION_MSG_ID = OsmAndConstants.UI_HANDLER_MAP_VIEW + 1; private static final int LONG_KEYPRESS_MSG_ID = OsmAndConstants.UI_HANDLER_MAP_VIEW + 2; private static final int LONG_KEYPRESS_DELAY = 500; + private static final int ZOOM_LABEL_DISPLAY = 16; + private static final int MIN_ZOOM_LABEL_DISPLAY = 12; private static final Log LOG = PlatformUtil.getLog(MapActivity.class); @@ -749,7 +751,6 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven } // remember if map should come back to isMapLinkedToLocation=true mapViewTrackingUtilities.setMapLinkedToLocation(false); - if (mapLabelToShow != null && !mapLabelToShow.contextMenuDisabled()) { mapContextMenu.setMapCenter(latLonToShow); mapContextMenu.setMapPosition(mapView.getMapPosition()); @@ -764,7 +765,8 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven tb.setPixelDimensions(tbw, tbh); tb.setLatLonCenter(latLonToShow.getLatitude(), latLonToShow.getLongitude()); - while (!tb.containsLatLon(prevCenter.getLatitude(), prevCenter.getLongitude()) && tb.getZoom() > 10) { + tb.setZoom(ZOOM_LABEL_DISPLAY); + while (!tb.containsLatLon(prevCenter.getLatitude(), prevCenter.getLongitude()) && tb.getZoom() > MIN_ZOOM_LABEL_DISPLAY) { tb.setZoom(tb.getZoom() - 1); } //mapContextMenu.setMapZoom(settings.getMapZoomToShow());