diff --git a/OsmAnd-java/src/net/osmand/IndexConstants.java b/OsmAnd-java/src/net/osmand/IndexConstants.java
index 508f98d4b3..dc60d88135 100644
--- a/OsmAnd-java/src/net/osmand/IndexConstants.java
+++ b/OsmAnd-java/src/net/osmand/IndexConstants.java
@@ -10,11 +10,15 @@ public class IndexConstants {
public final static int VOICE_VERSION = 0; //supported download versions
public final static int TTSVOICE_VERSION = 1; //supported download versions
+ public static final String SQLITE_EXT = ".sqlitedb"; //$NON-NLS-1$
+ public static final String TEMP_SOURCE_TO_LOAD = "temp";
+
public static final String POI_INDEX_EXT = ".poi.odb"; //$NON-NLS-1$
public static final String BINARY_MAP_INDEX_EXT = ".obf"; //$NON-NLS-1$
public static final String BINARY_MAP_INDEX_EXT_ZIP = ".obf.zip"; //$NON-NLS-1$
+ public static final String BINARY_WIKIVOYAGE_MAP_INDEX_EXT = ".sqlite"; //$NON-NLS-1$
public static final String BINARY_WIKI_MAP_INDEX_EXT = ".wiki.obf"; //$NON-NLS-1$
public static final String BINARY_WIKI_MAP_INDEX_EXT_ZIP = ".wiki.obf.zip"; //$NON-NLS-1$
public static final String BINARY_ROAD_MAP_INDEX_EXT = ".road.obf"; //$NON-NLS-1$
@@ -62,8 +66,7 @@ public class IndexConstants {
public static final String ROUTING_XML_FILE= "routing.xml";
- public static final String SQLITE_EXT = ".sqlitedb"; //$NON-NLS-1$
- public static final String TEMP_SOURCE_TO_LOAD = "temp";
+
}
diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index 5df3842b5d..bdad9d75c4 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -9,6 +9,8 @@
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
-->
+ Travel maps
+ Wikivoyage
Article removed
Search: Country, City, Province
Read
diff --git a/OsmAnd/src/net/osmand/PlatformUtil.java b/OsmAnd/src/net/osmand/PlatformUtil.java
index 7fb26b8c96..301443074b 100644
--- a/OsmAnd/src/net/osmand/PlatformUtil.java
+++ b/OsmAnd/src/net/osmand/PlatformUtil.java
@@ -114,9 +114,9 @@ public class PlatformUtil {
@Override
public boolean isDebugEnabled() {
- // For debur purposes always true
- return android.util.Log.isLoggable(TAG, android.util.Log.DEBUG);
-// return true;
+ // For debug purposes always true
+ // return android.util.Log.isLoggable(TAG, android.util.Log.DEBUG);
+ return true;
}
@Override
diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadActivityType.java b/OsmAnd/src/net/osmand/plus/download/DownloadActivityType.java
index d1c1f3625d..dd6551c709 100644
--- a/OsmAnd/src/net/osmand/plus/download/DownloadActivityType.java
+++ b/OsmAnd/src/net/osmand/plus/download/DownloadActivityType.java
@@ -45,6 +45,8 @@ public class DownloadActivityType {
new DownloadActivityType(R.string.download_hillshade_maps, R.drawable.ic_action_hillshade_dark, "hillshade", 50);
public static final DownloadActivityType WIKIPEDIA_FILE =
new DownloadActivityType(R.string.download_wikipedia_maps, R.drawable.ic_plugin_wikipedia, "wikimap", 60);
+ public static final DownloadActivityType WIKIVOYAGE_FILE =
+ new DownloadActivityType(R.string.shared_string_wikivoyage, R.drawable.ic_plugin_wikipedia, "wikivoyage", 65);
public static final DownloadActivityType LIVE_UPDATES_FILE =
new DownloadActivityType(R.string.download_live_updates, "live_updates", 70);
private final int stringResource;
@@ -121,6 +123,8 @@ public class DownloadActivityType {
} else if (WIKIPEDIA_FILE == this) {
return fileName.endsWith(addVersionToExt(IndexConstants.BINARY_WIKI_MAP_INDEX_EXT_ZIP,
IndexConstants.BINARY_MAP_VERSION));
+ } else if (WIKIVOYAGE_FILE == this) {
+ return fileName.endsWith(IndexConstants.BINARY_WIKIVOYAGE_MAP_INDEX_EXT);
} else if (SRTM_COUNTRY_FILE == this) {
return fileName.endsWith(addVersionToExt(IndexConstants.BINARY_SRTM_MAP_INDEX_EXT_ZIP,
IndexConstants.BINARY_MAP_VERSION));
@@ -148,6 +152,8 @@ public class DownloadActivityType {
return ctx.getAppPath(IndexConstants.SRTM_INDEX_DIR);
} else if (WIKIPEDIA_FILE == this) {
return ctx.getAppPath(IndexConstants.WIKI_INDEX_DIR);
+ } else if (WIKIVOYAGE_FILE == this) {
+ return ctx.getAppPath(IndexConstants.WIKIVOYAGE_INDEX_DIR);
} else if (LIVE_UPDATES_FILE == this) {
return ctx.getAppPath(IndexConstants.LIVE_INDEX_DIR);
} else if (HILLSHADE_FILE == this) {
@@ -159,7 +165,7 @@ public class DownloadActivityType {
}
public boolean isZipStream(OsmandApplication ctx, IndexItem indexItem) {
- return HILLSHADE_FILE != this;
+ return HILLSHADE_FILE != this && WIKIVOYAGE_FILE != this;
}
public boolean isZipFolder(OsmandApplication ctx, IndexItem indexItem) {
@@ -193,6 +199,8 @@ public class DownloadActivityType {
return IndexConstants.BINARY_SRTM_MAP_INDEX_EXT;
} else if (WIKIPEDIA_FILE == this) {
return IndexConstants.BINARY_WIKI_MAP_INDEX_EXT;
+ } else if (WIKIVOYAGE_FILE == this) {
+ return IndexConstants.BINARY_WIKIVOYAGE_MAP_INDEX_EXT;
} else if (LIVE_UPDATES_FILE == this) {
return BINARY_MAP_INDEX_EXT;
} else if (HILLSHADE_FILE == this) {
@@ -212,6 +220,8 @@ public class DownloadActivityType {
return "&srtmcountry=yes";
} else if (this == WIKIPEDIA_FILE) {
return "&wiki=yes";
+ } else if (this == WIKIVOYAGE_FILE) {
+ return "&wikivoyage=yes";
} else if (this == HILLSHADE_FILE) {
return "&hillshade=yes";
} else if (this == FONT_FILE) {
@@ -269,6 +279,8 @@ public class DownloadActivityType {
return ctx.getString(R.string.download_srtm_maps);
} else if (this == WIKIPEDIA_FILE) {
return ctx.getString(R.string.shared_string_wikipedia);
+ } else if (this == WIKIVOYAGE_FILE) {
+ return ctx.getString(R.string.shared_string_wikivoyage);
} else if (this == ROADS_FILE) {
return ctx.getString(R.string.download_roads_only_item);
} else if (this == DEPTH_CONTOUR_FILE) {
@@ -356,6 +368,10 @@ public class DownloadActivityType {
if (this == WIKIPEDIA_FILE) {
return baseNameWithoutVersion + IndexConstants.BINARY_WIKI_MAP_INDEX_EXT;
}
+ if (this == WIKIVOYAGE_FILE) {
+ return baseNameWithoutVersion + IndexConstants.BINARY_WIKIVOYAGE_MAP_INDEX_EXT;
+ }
+
if (this == ROADS_FILE) {
return baseNameWithoutVersion + IndexConstants.BINARY_ROAD_MAP_INDEX_EXT;
}
diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadFileHelper.java b/OsmAnd/src/net/osmand/plus/download/DownloadFileHelper.java
index fc4b902b9c..2aef38aa1f 100644
--- a/OsmAnd/src/net/osmand/plus/download/DownloadFileHelper.java
+++ b/OsmAnd/src/net/osmand/plus/download/DownloadFileHelper.java
@@ -205,7 +205,7 @@ public class DownloadFileHelper {
try {
final List downloadInputStreams = new ArrayList();
URL url = new URL(de.urlToDownload); //$NON-NLS-1$
- log.debug("Url downloading " + de.urlToDownload);
+ log.info("Url downloading " + de.urlToDownload);
downloadInputStreams.add(getInputStreamToDownload(url, forceWifi));
de.fileToDownload = de.targetFile;
if(!de.unzipFolder) {
diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadResourceGroup.java b/OsmAnd/src/net/osmand/plus/download/DownloadResourceGroup.java
index e1ea3a0c60..d95d45acd1 100644
--- a/OsmAnd/src/net/osmand/plus/download/DownloadResourceGroup.java
+++ b/OsmAnd/src/net/osmand/plus/download/DownloadResourceGroup.java
@@ -34,6 +34,8 @@ public class DownloadResourceGroup {
SRTM_HEADER(R.string.download_srtm_maps),
HILLSHADE_HEADER(R.string.download_hillshade_maps),
OTHER_MAPS_HEADER(R.string.download_select_map_types),
+ WIKIVOYAGE_HEADER(R.string.shared_string_wikivoyage),
+
NAUTICAL_MAPS_HEADER(R.string.nautical_maps),
// headers with voice items
VOICE_HEADER_TTS(R.string.index_name_tts_voice),
@@ -42,11 +44,13 @@ public class DownloadResourceGroup {
FONTS_HEADER(R.string.fonts_header),
// headers with resources
NAUTICAL_MAPS_GROUP(R.string.nautical_maps),
+ TRAVEL_GROUP(R.string.download_maps_travel),
OTHER_MAPS_GROUP(R.string.download_select_map_types),
OTHER_GROUP(R.string.other_menu_group),
SUBREGIONS(R.string.regions),
// screen items
NAUTICAL_MAPS(R.string.nautical_maps),
+ WIKIVOYAGE_MAPS(R.string.download_maps_travel),
VOICE_TTS(R.string.index_name_tts_voice),
FONTS(R.string.fonts_header),
VOICE_REC(R.string.index_name_voice),
@@ -62,7 +66,7 @@ public class DownloadResourceGroup {
public boolean isScreen() {
return this == WORLD || this == REGION || this == VOICE_TTS
- || this == VOICE_REC || this == OTHER_MAPS || this == FONTS || this == NAUTICAL_MAPS;
+ || this == VOICE_REC || this == OTHER_MAPS || this == FONTS || this == NAUTICAL_MAPS || this == WIKIVOYAGE_MAPS;
}
public String getDefaultId() {
@@ -75,15 +79,17 @@ public class DownloadResourceGroup {
public boolean containsIndexItem() {
return isHeader() && this != SUBREGIONS && this != OTHER_GROUP && this != OTHER_MAPS_GROUP
- && this != NAUTICAL_MAPS_GROUP;
+ && this != NAUTICAL_MAPS_GROUP && this != TRAVEL_GROUP;
}
public boolean isHeader() {
return this == VOICE_HEADER_REC || this == VOICE_HEADER_TTS || this == SUBREGIONS
- || this == WORLD_MAPS || this == REGION_MAPS || this == OTHER_GROUP
+ || this == WORLD_MAPS || this == REGION_MAPS || this == OTHER_GROUP
|| this == HILLSHADE_HEADER || this == SRTM_HEADER
|| this == OTHER_MAPS_HEADER || this == OTHER_MAPS_GROUP
- || this == FONTS_HEADER || this == NAUTICAL_MAPS_HEADER || this == NAUTICAL_MAPS_GROUP;
+ || this == FONTS_HEADER
+ || this == NAUTICAL_MAPS_HEADER || this == NAUTICAL_MAPS_GROUP
+ || this == WIKIVOYAGE_HEADER || this == TRAVEL_GROUP;
}
public static String getVoiceTTSId() {
diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadResources.java b/OsmAnd/src/net/osmand/plus/download/DownloadResources.java
index 78ece750e8..e4ae85d072 100644
--- a/OsmAnd/src/net/osmand/plus/download/DownloadResources.java
+++ b/OsmAnd/src/net/osmand/plus/download/DownloadResources.java
@@ -140,6 +140,7 @@ public class DownloadResources extends DownloadResourceGroup {
if ((item.getType() == DownloadActivityType.NORMAL_FILE && !item.extra)
|| item.getType() == DownloadActivityType.ROADS_FILE
|| item.getType() == DownloadActivityType.WIKIPEDIA_FILE
+ || item.getType() == DownloadActivityType.WIKIVOYAGE_FILE
|| item.getType() == DownloadActivityType.DEPTH_CONTOUR_FILE
|| item.getType() == DownloadActivityType.SRTM_COUNTRY_FILE) {
outdated = true;
@@ -268,6 +269,10 @@ public class DownloadResources extends DownloadResourceGroup {
DownloadResourceGroup nauticalMapsGroup = new DownloadResourceGroup(this, DownloadResourceGroupType.NAUTICAL_MAPS_GROUP);
DownloadResourceGroup nauticalMapsScreen = new DownloadResourceGroup(nauticalMapsGroup, DownloadResourceGroupType.NAUTICAL_MAPS);
DownloadResourceGroup nauticalMaps = new DownloadResourceGroup(nauticalMapsGroup, DownloadResourceGroupType.NAUTICAL_MAPS_HEADER);
+
+ DownloadResourceGroup wikivoyageMapsGroup = new DownloadResourceGroup(this, DownloadResourceGroupType.TRAVEL_GROUP);
+ DownloadResourceGroup wikivoyageMapsScreen = new DownloadResourceGroup(wikivoyageMapsGroup, DownloadResourceGroupType.WIKIVOYAGE_MAPS);
+ DownloadResourceGroup wikivoyageMaps = new DownloadResourceGroup(wikivoyageMapsGroup, DownloadResourceGroupType.WIKIVOYAGE_HEADER);
Map > groupByRegion = new LinkedHashMap>();
OsmandRegions regs = app.getRegions();
@@ -290,6 +295,10 @@ public class DownloadResources extends DownloadResourceGroup {
}
continue;
}
+ if(ii.getType() == DownloadActivityType.WIKIVOYAGE_FILE) {
+ wikivoyageMaps.addItem(ii);
+ continue;
+ }
String basename = ii.getBasename().toLowerCase();
WorldRegion wg = regs.getRegionDataByDownloadName(basename);
if (wg != null) {
@@ -354,6 +363,10 @@ public class DownloadResources extends DownloadResourceGroup {
nauticalMapsGroup.addGroup(nauticalMapsScreen);
addGroup(nauticalMapsGroup);
+ wikivoyageMapsScreen.addGroup(wikivoyageMaps);
+ wikivoyageMapsGroup.addGroup(wikivoyageMapsScreen);
+ addGroup(wikivoyageMapsGroup);
+
if (otherMaps.size() > 0) {
addGroup(otherMapsGroup);
}
@@ -365,6 +378,8 @@ public class DownloadResources extends DownloadResourceGroup {
}
otherGroup.addGroup(voiceScreenTTS);
otherGroup.addGroup(voiceScreenRec);
+
+
if (fonts.getIndividualResources() != null) {
otherGroup.addGroup(fontScreen);
}
diff --git a/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java b/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java
index ab9dc902d1..732424eeeb 100644
--- a/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java
+++ b/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java
@@ -405,6 +405,8 @@ public class ItemViewHolder {
tp = LocalIndexType.SRTM_DATA;
} else if (indexItem.getType() == DownloadActivityType.WIKIPEDIA_FILE) {
tp = LocalIndexType.MAP_DATA;
+ } else if (indexItem.getType() == DownloadActivityType.WIKIVOYAGE_FILE) {
+ tp = LocalIndexType.MAP_DATA;
} else if (indexItem.getType() == DownloadActivityType.FONT_FILE) {
tp = LocalIndexType.FONT_DATA;
} else if (indexItem.getType() == DownloadActivityType.VOICE_FILE) {