Merge pull request #8994 from osmandapp/basemap_detailed

add detailed basemap #7999
This commit is contained in:
vshcherb 2020-05-18 17:38:58 +02:00 committed by GitHub
commit f71f606279
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 4 deletions

View file

@ -10,7 +10,7 @@
- For wording and consistency, please note https://osmand.net/help-online?id=technical-articles#Creating_a_Consistent_User_Experience - For wording and consistency, please note https://osmand.net/help-online?id=technical-articles#Creating_a_Consistent_User_Experience
Thx - Hardy Thx - Hardy
--> --> <string name="index_item_world_basemap_detailed">World overview map (detailed)</string>
<string name="profiles_for_action_not_found">Profiles selected for this action not found.</string> <string name="profiles_for_action_not_found">Profiles selected for this action not found.</string>
<string name="change_application_profile">Change application profile</string> <string name="change_application_profile">Change application profile</string>
<string name="shared_string_add_profile">Add profile</string> <string name="shared_string_add_profile">Add profile</string>

View file

@ -219,6 +219,8 @@ public class FileNameTranslationHelper {
return ctx.getString(R.string.index_item_world_altitude_correction); return ctx.getString(R.string.index_item_world_altitude_correction);
} else if (basename.equals("world_basemap")) { } else if (basename.equals("world_basemap")) {
return ctx.getString(R.string.index_item_world_basemap); return ctx.getString(R.string.index_item_world_basemap);
} else if (basename.equals("world_basemap_detailed")){
return ctx.getString(R.string.index_item_world_basemap_detailed);
} else if (basename.equals("world_bitcoin_payments")) { } else if (basename.equals("world_bitcoin_payments")) {
return ctx.getString(R.string.index_item_world_bitcoin_payments); return ctx.getString(R.string.index_item_world_bitcoin_payments);
} else if (basename.equals(DownloadResources.WORLD_SEAMARKS_KEY) || } else if (basename.equals(DownloadResources.WORLD_SEAMARKS_KEY) ||

View file

@ -664,19 +664,33 @@ public class ResourceManager {
} }
File liveDir = context.getAppPath(IndexConstants.LIVE_INDEX_DIR); File liveDir = context.getAppPath(IndexConstants.LIVE_INDEX_DIR);
depthContours = false; depthContours = false;
boolean hasWorldBasemap = false; File worldBasemapStd = null;
File worldBasemapDetailed = null;
File worldBasemapMini = null; File worldBasemapMini = null;
for (File f : files) { for (File f : files) {
if (f.getName().equals("World_basemap.obf")) { if (f.getName().equals("World_basemap.obf")) {
hasWorldBasemap = true; worldBasemapStd = f;
} }
if (f.getName().startsWith("World_basemap_mini")) { if (f.getName().startsWith("World_basemap_mini")) {
worldBasemapMini = f; worldBasemapMini = f;
} }
if (f.getName().startsWith("World_basemap_detailed")) {
worldBasemapDetailed = f;
}
} }
if (hasWorldBasemap && worldBasemapMini != null) {
if (worldBasemapDetailed != null) {
if (worldBasemapStd != null) {
files.remove(worldBasemapStd);
}
if (worldBasemapMini != null) {
files.remove(worldBasemapMini);
}
} else if (worldBasemapStd != null && worldBasemapMini != null) {
files.remove(worldBasemapMini); files.remove(worldBasemapMini);
} }
java.text.DateFormat dateFormat = getDateFormat(); java.text.DateFormat dateFormat = getDateFormat();
for (File f : files) { for (File f : files) {
progress.startTask(context.getString(R.string.indexing_map) + " " + f.getName(), -1); //$NON-NLS-1$ progress.startTask(context.getString(R.string.indexing_map) + " " + f.getName(), -1); //$NON-NLS-1$