This commit is contained in:
GaidamakUA 2015-10-02 14:23:19 +03:00
commit 32e02ac2c8
4 changed files with 24 additions and 11 deletions

View file

@ -2161,4 +2161,5 @@
<string name="favorite_category_add_new">Tilføj ny</string>
<string name="favorite_category_select">Vælg kategori</string>
<string name="downloading_number_of_fiels">Henter - %1$d fil</string>
</resources>
<string name="srtm_plugin_disabled">Højdekurver er deaktiveret</string>
</resources>

View file

@ -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_select">Scegli la categoria</string>
<string name="downloading_number_of_fiels">In download - %1$d file</string>
</resources>
<string name="srtm_plugin_disabled">Linee isocline disattivate</string>
</resources>

View file

@ -9,6 +9,7 @@
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
-->
<string name="srtm_plugin_disabled">Contour lines disabled</string>
<string name="favorite_category_add_new">Add new</string>
<string name="favorite_category_select">Select category</string>
<string name="default_speed_system_descr">Define speed measurement system</string>

View file

@ -5,10 +5,13 @@ import android.content.Context;
import net.osmand.PlatformUtil;
import net.osmand.map.OsmandRegions;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.WorldRegion;
import net.osmand.plus.download.DownloadActivity;
import net.osmand.plus.download.DownloadActivityType;
import net.osmand.plus.download.IndexItem;
import net.osmand.plus.openseamapsplugin.NauticalMapsPlugin;
import net.osmand.plus.srtmplugin.SRTMPlugin;
import net.osmand.util.Algorithms;
import java.util.Collections;
@ -24,6 +27,9 @@ import java.util.concurrent.locks.ReentrantLock;
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 {
private String resourceId;
@ -273,7 +279,7 @@ public class ItemsListBuilder {
}
private void collectSubregionsDataAndItems() {
srtmDisabled = false; //todo: check if srtm plugin disabled
srtmDisabled = OsmandPlugin.getEnabledPlugin(SRTMPlugin.class) == null;
hasSrtm = false;
// 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(regionMapItems, new ResourceItemComparator());
/*
* todo: remove seamarks if plugin is off
if (![[OAIAPHelper sharedInstance] productPurchased:kInAppId_Addon_Nautical]) {
for (ResourceItem *item in _regionMapItems)
if (item.resourceId.compare(QString(kWorldSeamarksKey)) == 0) {
[_regionMapItems removeObject:item];
break;
boolean nauticalPluginDisabled = OsmandPlugin.getEnabledPlugin(NauticalMapsPlugin.class) == null;
if (nauticalPluginDisabled) {
ResourceItem seamarksMapItem = null;
for (ResourceItem item : regionMapItems) {
if (item.getResourceId().equals(WORLD_SEAMARKS_KEY)) {
seamarksMapItem = item;
break;
}
}
if (seamarksMapItem != null) {
regionMapItems.remove(seamarksMapItem);
}
}
*/
}
}