From 4a340f7c466d29e9da74574ac3ac3a6499cc632e Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Thu, 14 Oct 2010 09:06:08 +0000 Subject: [PATCH] fix issue 91 git-svn-id: https://osmand.googlecode.com/svn/trunk@569 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8 --- DataExtractionOSM/src/net/osmand/ToDoConstants.java | 2 +- OsmAnd/res/values-ru/strings.xml | 2 ++ OsmAnd/res/values/strings.xml | 2 ++ OsmAnd/res/xml/settings_pref.xml | 1 + OsmAnd/src/net/osmand/OsmandSettings.java | 8 ++++++++ OsmAnd/src/net/osmand/activities/SettingsActivity.java | 1 + OsmAnd/src/net/osmand/views/OsmandMapTileView.java | 6 +++--- 7 files changed, 18 insertions(+), 4 deletions(-) diff --git a/DataExtractionOSM/src/net/osmand/ToDoConstants.java b/DataExtractionOSM/src/net/osmand/ToDoConstants.java index 58abdb3deb..8ce49301bf 100644 --- a/DataExtractionOSM/src/net/osmand/ToDoConstants.java +++ b/DataExtractionOSM/src/net/osmand/ToDoConstants.java @@ -9,7 +9,7 @@ public class ToDoConstants { // TODO max 100 // FOR 0.4 beta RELEASE - // Profile + // Profile vector rendering // fix issue with loading app (and not visible map) diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml index 0e0fae1b1f..592b104d85 100644 --- a/OsmAnd/res/values-ru/strings.xml +++ b/OsmAnd/res/values-ru/strings.xml @@ -1,5 +1,7 @@ + Карта высокого разрешения + Отображать 1:1 карты для устройств высокого разрешения В данный момент местоположение не определено Загрузить {0} файл(ов)? Загрузить diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index fb80be4bad..9cf32c8e31 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -1,5 +1,7 @@ + High resolution map + Use high resolution map for high density devices Сurrently location is unknown Download {0} files? Download diff --git a/OsmAnd/res/xml/settings_pref.xml b/OsmAnd/res/xml/settings_pref.xml index 5145afdf5d..51ddda1783 100644 --- a/OsmAnd/res/xml/settings_pref.xml +++ b/OsmAnd/res/xml/settings_pref.xml @@ -16,6 +16,7 @@ + diff --git a/OsmAnd/src/net/osmand/OsmandSettings.java b/OsmAnd/src/net/osmand/OsmandSettings.java index 4acc4a96a0..c13c0e9659 100644 --- a/OsmAnd/src/net/osmand/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/OsmandSettings.java @@ -112,6 +112,14 @@ public class OsmandSettings { return prefs.getBoolean(USE_TRACKBALL_FOR_MOVEMENTS, USE_TRACKBALL_FOR_MOVEMENTS_DEF); } + // this value string is synchronized with settings_pref.xml preference name + public static final String USE_HIGH_RES_MAPS = "use_high_res_maps"; //$NON-NLS-1$ + public static final boolean USE_HIGH_RES_MAPS_DEF = false; + + public static boolean isUsingHighResMaps(SharedPreferences prefs) { + return prefs.getBoolean(USE_HIGH_RES_MAPS, USE_HIGH_RES_MAPS_DEF); + } + // this value string is synchronized with settings_pref.xml preference name public static final String SHOW_POI_OVER_MAP = "show_poi_over_map"; //$NON-NLS-1$ diff --git a/OsmAnd/src/net/osmand/activities/SettingsActivity.java b/OsmAnd/src/net/osmand/activities/SettingsActivity.java index bb181a1aa8..a6af3da448 100644 --- a/OsmAnd/src/net/osmand/activities/SettingsActivity.java +++ b/OsmAnd/src/net/osmand/activities/SettingsActivity.java @@ -100,6 +100,7 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference private BooleanPreference[] booleanPreferences = new BooleanPreference[]{ new BooleanPreference(OsmandSettings.SHOW_VIEW_ANGLE, OsmandSettings.SHOW_VIEW_ANGLE_DEF), new BooleanPreference(OsmandSettings.USE_TRACKBALL_FOR_MOVEMENTS, OsmandSettings.USE_TRACKBALL_FOR_MOVEMENTS_DEF), + new BooleanPreference(OsmandSettings.USE_HIGH_RES_MAPS, OsmandSettings.USE_HIGH_RES_MAPS_DEF), new BooleanPreference(OsmandSettings.USE_ENGLISH_NAMES, OsmandSettings.USE_ENGLISH_NAMES_DEF), new BooleanPreference(OsmandSettings.AUTO_ZOOM_MAP, OsmandSettings.AUTO_ZOOM_MAP_DEF), new BooleanPreference(OsmandSettings.SAVE_TRACK_TO_GPX, OsmandSettings.SAVE_TRACK_TO_GPX_DEF), diff --git a/OsmAnd/src/net/osmand/views/OsmandMapTileView.java b/OsmAnd/src/net/osmand/views/OsmandMapTileView.java index e2104e27a6..d2a031040e 100644 --- a/OsmAnd/src/net/osmand/views/OsmandMapTileView.java +++ b/OsmAnd/src/net/osmand/views/OsmandMapTileView.java @@ -225,9 +225,9 @@ public class OsmandMapTileView extends SurfaceView implements IMapDownloaderCall // that trigger allows to scale tiles for certain devices // for example for device with density > 1 draw tiles the same size as with density = 1 // It makes text bigger but blurry, the settings could be introduced for that -// if (dm != null && dm.density > 1f) { -// res *= dm.density; -// } + if (dm != null && dm.density > 1f && !OsmandSettings.isUsingHighResMaps(getSettings()) ) { + res *= dm.density; + } return res; }