From 619fab42d16f2dd214e30170ac6f2d0ab9b12c83 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Thu, 17 Dec 2015 16:58:15 +0200 Subject: [PATCH] Make default language of basemap = display language --- .../src/net/osmand/plus/render/MapRenderRepositories.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/render/MapRenderRepositories.java b/OsmAnd/src/net/osmand/plus/render/MapRenderRepositories.java index 240bf20a3c..0ec1b78956 100644 --- a/OsmAnd/src/net/osmand/plus/render/MapRenderRepositories.java +++ b/OsmAnd/src/net/osmand/plus/render/MapRenderRepositories.java @@ -72,6 +72,7 @@ public class MapRenderRepositories { private final static Log log = PlatformUtil.getLog(MapRenderRepositories.class); private final OsmandApplication context; private final static int zoomOnlyForBasemaps = 11; + static int zoomForBaseRouteRendering = 14; private Handler handler; private Map files = new LinkedHashMap(); @@ -710,7 +711,12 @@ public class MapRenderRepositories { currentRenderingContext.width = requestedBox.getPixWidth(); currentRenderingContext.height = requestedBox.getPixHeight(); currentRenderingContext.nightMode = nightMode; - currentRenderingContext.preferredLocale = prefs.MAP_PREFERRED_LOCALE.get(); + if(requestedBox.getZoom() <= zoomOnlyForBasemaps && + "".equals(prefs.MAP_PREFERRED_LOCALE.get())) { + currentRenderingContext.preferredLocale = app.getLanguage(); + } else { + currentRenderingContext.preferredLocale = prefs.MAP_PREFERRED_LOCALE.get(); + } final float mapDensity = (float) requestedBox.getMapDensity(); currentRenderingContext.setDensityValue(mapDensity); //Text/icon scales according to mapDensity (so text is size of road)