add detailed basemap

This commit is contained in:
MadWasp79 2020-05-18 18:31:43 +03:00
parent 6ae95c14bd
commit f82fd5bf4a
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
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="change_application_profile">Change application 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);
} else if (basename.equals("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")) {
return ctx.getString(R.string.index_item_world_bitcoin_payments);
} 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);
depthContours = false;
boolean hasWorldBasemap = false;
File worldBasemapStd = null;
File worldBasemapDetailed = null;
File worldBasemapMini = null;
for (File f : files) {
if (f.getName().equals("World_basemap.obf")) {
hasWorldBasemap = true;
worldBasemapStd = f;
}
if (f.getName().startsWith("World_basemap_mini")) {
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);
}
java.text.DateFormat dateFormat = getDateFormat();
for (File f : files) {
progress.startTask(context.getString(R.string.indexing_map) + " " + f.getName(), -1); //$NON-NLS-1$