Merge branch 'master' of https://github.com/osmandapp/Osmand
This commit is contained in:
commit
32e02ac2c8
4 changed files with 24 additions and 11 deletions
|
@ -2161,4 +2161,5 @@
|
||||||
<string name="favorite_category_add_new">Tilføj ny</string>
|
<string name="favorite_category_add_new">Tilføj ny</string>
|
||||||
<string name="favorite_category_select">Vælg kategori</string>
|
<string name="favorite_category_select">Vælg kategori</string>
|
||||||
<string name="downloading_number_of_fiels">Henter - %1$d fil</string>
|
<string name="downloading_number_of_fiels">Henter - %1$d fil</string>
|
||||||
</resources>
|
<string name="srtm_plugin_disabled">Højdekurver er deaktiveret</string>
|
||||||
|
</resources>
|
||||||
|
|
|
@ -2205,4 +2205,5 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz
|
||||||
<string name="favorite_category_add_new">Aggiungi nuova</string>
|
<string name="favorite_category_add_new">Aggiungi nuova</string>
|
||||||
<string name="favorite_category_select">Scegli la categoria</string>
|
<string name="favorite_category_select">Scegli la categoria</string>
|
||||||
<string name="downloading_number_of_fiels">In download - %1$d file</string>
|
<string name="downloading_number_of_fiels">In download - %1$d file</string>
|
||||||
</resources>
|
<string name="srtm_plugin_disabled">Linee isocline disattivate</string>
|
||||||
|
</resources>
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
|
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
|
||||||
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
|
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
|
||||||
-->
|
-->
|
||||||
|
<string name="srtm_plugin_disabled">Contour lines disabled</string>
|
||||||
<string name="favorite_category_add_new">Add new</string>
|
<string name="favorite_category_add_new">Add new</string>
|
||||||
<string name="favorite_category_select">Select category</string>
|
<string name="favorite_category_select">Select category</string>
|
||||||
<string name="default_speed_system_descr">Define speed measurement system</string>
|
<string name="default_speed_system_descr">Define speed measurement system</string>
|
||||||
|
|
|
@ -5,10 +5,13 @@ import android.content.Context;
|
||||||
import net.osmand.PlatformUtil;
|
import net.osmand.PlatformUtil;
|
||||||
import net.osmand.map.OsmandRegions;
|
import net.osmand.map.OsmandRegions;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
import net.osmand.plus.OsmandPlugin;
|
||||||
import net.osmand.plus.WorldRegion;
|
import net.osmand.plus.WorldRegion;
|
||||||
import net.osmand.plus.download.DownloadActivity;
|
import net.osmand.plus.download.DownloadActivity;
|
||||||
import net.osmand.plus.download.DownloadActivityType;
|
import net.osmand.plus.download.DownloadActivityType;
|
||||||
import net.osmand.plus.download.IndexItem;
|
import net.osmand.plus.download.IndexItem;
|
||||||
|
import net.osmand.plus.openseamapsplugin.NauticalMapsPlugin;
|
||||||
|
import net.osmand.plus.srtmplugin.SRTMPlugin;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -24,6 +27,9 @@ import java.util.concurrent.locks.ReentrantLock;
|
||||||
|
|
||||||
public class ItemsListBuilder {
|
public class ItemsListBuilder {
|
||||||
|
|
||||||
|
public static final String WORLD_BASEMAP_KEY = "world_basemap.obf.zip";
|
||||||
|
public static final String WORLD_SEAMARKS_KEY = "world_seamarks_basemap.obf.zip";
|
||||||
|
|
||||||
public class ResourceItem {
|
public class ResourceItem {
|
||||||
|
|
||||||
private String resourceId;
|
private String resourceId;
|
||||||
|
@ -273,7 +279,7 @@ public class ItemsListBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void collectSubregionsDataAndItems() {
|
private void collectSubregionsDataAndItems() {
|
||||||
srtmDisabled = false; //todo: check if srtm plugin disabled
|
srtmDisabled = OsmandPlugin.getEnabledPlugin(SRTMPlugin.class) == null;
|
||||||
hasSrtm = false;
|
hasSrtm = false;
|
||||||
|
|
||||||
// Collect all regions (and their parents) that have at least one
|
// Collect all regions (and their parents) that have at least one
|
||||||
|
@ -356,15 +362,19 @@ public class ItemsListBuilder {
|
||||||
Collections.sort(allResourceItems, new ResourceItemComparator());
|
Collections.sort(allResourceItems, new ResourceItemComparator());
|
||||||
Collections.sort(regionMapItems, new ResourceItemComparator());
|
Collections.sort(regionMapItems, new ResourceItemComparator());
|
||||||
|
|
||||||
/*
|
boolean nauticalPluginDisabled = OsmandPlugin.getEnabledPlugin(NauticalMapsPlugin.class) == null;
|
||||||
* todo: remove seamarks if plugin is off
|
|
||||||
if (![[OAIAPHelper sharedInstance] productPurchased:kInAppId_Addon_Nautical]) {
|
if (nauticalPluginDisabled) {
|
||||||
for (ResourceItem *item in _regionMapItems)
|
ResourceItem seamarksMapItem = null;
|
||||||
if (item.resourceId.compare(QString(kWorldSeamarksKey)) == 0) {
|
for (ResourceItem item : regionMapItems) {
|
||||||
[_regionMapItems removeObject:item];
|
if (item.getResourceId().equals(WORLD_SEAMARKS_KEY)) {
|
||||||
break;
|
seamarksMapItem = item;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (seamarksMapItem != null) {
|
||||||
|
regionMapItems.remove(seamarksMapItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue