Skip to content

Instantly share code, notes, and snippets.

@baturin
Created February 1, 2015 18:50
Show Gist options
  • Save baturin/4eda907d3b7dbc9d02c8 to your computer and use it in GitHub Desktop.
Save baturin/4eda907d3b7dbc9d02c8 to your computer and use it in GitHub Desktop.
osm wikovoyage poi
--- /tmp/eB8iAd_AmenityType.java 2015-02-02 00:49:26.055866038 +0600
+++ OsmAnd-java/src/net/osmand/data/AmenityType.java 2015-01-15 22:40:04.441862245 +0600
@@ -46,10 +46,11 @@
public static AmenityType NATURAL = reg("natural", "natural"); // [TAG] natural places, peaks, caves, trees,... //$NON-NLS-1$ //$NON-NLS-2$
public static AmenityType LANDUSE = reg("landuse", "landuse"); // [TAG] landuse //$NON-NLS-1$ //$NON-NLS-2$
public static AmenityType MILITARY = reg("military", "military"); // [TAG] military //$NON-NLS-1$ //$NON-NLS-2$
public static AmenityType OSMWIKI = reg("osmwiki", "osmwiki"); //$NON-NLS-1$
+ public static AmenityType WIKIVOYAGE = reg("wikivoyage", "wikivoyage"); //$NON-NLS-1$
public static AmenityType USER_DEFINED = reg("user_defined", "user_defined"); //$NON-NLS-1$
private final String defaultTag;
private final String name;
--- /tmp/sKZTld_build.gradle 2015-02-02 00:49:26.059866039 +0600
+++ OsmAnd/build.gradle 2015-01-11 21:55:26.357554282 +0600
@@ -188,14 +188,14 @@
include "*.html"
include "images/**/*.png"
}
task collectMiscResources(type: Copy) {
- from("../../../resources/obf_creation") {
+ from("../../resources/obf_creation") {
include "rendering_types.xml"
}
- from("../../../resources/poi") {
+ from("../../resources/poi") {
include "poi_types.xml"
}
into "resourcesSrc/net/osmand/osm"
}
--- /tmp/MQZEbg_strings.xml 2015-02-02 00:49:26.067866040 +0600
+++ OsmAnd/res/values/strings.xml 2015-01-16 00:28:27.605718617 +0600
@@ -1655,10 +1655,11 @@
<string name="amenity_type_shop">Shop</string>
<string name="amenity_type_sport">Sport</string>
<string name="amenity_type_sustenance">Sustenance</string>
<string name="amenity_type_tourism">Tourism</string>
<string name="amenity_type_transportation">Transport</string>
+ <string name="amenity_type_wikivoyage">Wikivoyage</string>
<string name="indexing_address">Indexing address&#8230;</string>
<string name="indexing_map">Indexing map&#8230;</string>
<string name="indexing_poi">Indexing POI&#8230;</string>
<string name="indexing_transport">Indexing transport&#8230;</string>
<string name="input_output_error">I/O error occurred</string>
--- /tmp/Q89FPg_PoiFiltersHelper.java 2015-02-02 00:49:26.075866036 +0600
+++ OsmAnd/src/net/osmand/plus/PoiFiltersHelper.java 2015-01-16 02:07:07.549587870 +0600
@@ -23,22 +23,24 @@
private List<PoiFilter> cacheUserDefinedFilters;
private List<PoiFilter> cacheOsmDefinedFilters;
private static final String UDF_CAR_AID = "car_aid";
private static final String UDF_FOR_TOURISTS = "for_tourists";
- private static final String UDF_FOOD_SHOP = "food_shop";
+ private static final String UDF_WIKIVOYAGE= "wikivoyage";
+ private static final String UDF_FOOD_SHOP = "food_shop";
private static final String UDF_FUEL = "fuel";
private static final String UDF_SIGHTSEEING = "sightseeing";
private static final String UDF_EMERGENCY = "emergency";
private static final String UDF_PUBLIC_TRANSPORT = "public_transport";
private static final String UDF_ENTERTAINMENT = "entertainment";
private static final String UDF_ACCOMMODATION = "accomodation";
private static final String UDF_RESTAURANTS = "restaurants";
private static final String UDF_PARKING = "parking";
-
+
+
private static final String[] DEL = new String[] {};
-
+
public PoiFiltersHelper(OsmandApplication application){
this.application = application;
}
public NameFinderPoiFilter getNameFinderPOIFilter() {
if(nameFinderPOIFilter == null){
@@ -88,10 +90,12 @@
configureDefaultUserDefinedFilter(null, UDF_CAR_AID), application));
filters.add(new PoiFilter(application.getString(R.string.poi_filter_food_shop), PoiFilter.USER_PREFIX + UDF_FOOD_SHOP,
configureDefaultUserDefinedFilter(null, UDF_FOOD_SHOP), application));
filters.add(new PoiFilter(application.getString(R.string.poi_filter_for_tourists), PoiFilter.USER_PREFIX + UDF_FOR_TOURISTS,
configureDefaultUserDefinedFilter(null, UDF_FOR_TOURISTS), application));
+ filters.add(new PoiFilter("Wikivoyage", PoiFilter.USER_PREFIX + UDF_WIKIVOYAGE,
+ configureDefaultUserDefinedFilter(null, UDF_WIKIVOYAGE), application));
filters.add(new PoiFilter(application.getString(R.string.poi_filter_fuel), PoiFilter.USER_PREFIX + UDF_FUEL,
configureDefaultUserDefinedFilter(null, UDF_FUEL), application));
filters.add(new PoiFilter(application.getString(R.string.poi_filter_parking), PoiFilter.USER_PREFIX + UDF_PARKING,
configureDefaultUserDefinedFilter(null, UDF_PARKING), application));
filters.add(new PoiFilter(application.getString(R.string.poi_filter_public_transport),
@@ -125,11 +129,13 @@
putAll(types, AmenityType.FINANCE);
putAll(types, AmenityType.OSMWIKI);
putValues(types, AmenityType.OTHER, "place_of_worship", "internet_access_wlan", "internet_access_wired",
"internet_access_terminal", "internet_access_public", "internet_access_service",
"embassy", "marketplace", "post_office", "telephone", "toilets", "emergency_phone");
- } else if(UDF_FUEL.equals(key)){
+ } else if (UDF_WIKIVOYAGE.equals(key)){
+ putValues(types, AmenityType.WIKIVOYAGE, "wikivoyage", "see", "do", "sleep", "eat");
+ } else if(UDF_FUEL.equals(key)){
putValues(types, AmenityType.TRANSPORTATION, "fuel");
} else if (UDF_PARKING.equals(key)) {
putValues(types, AmenityType.TRANSPORTATION, "parking",
"bicycle_parking");
} else if (UDF_PUBLIC_TRANSPORT.equals(key)) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment