From cfbfa188cc4b6d7a16876cdfa3f4d714c274a025 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Wed, 25 Mar 2015 00:06:52 +0100 Subject: [PATCH] Fix poi types --- .../src/net/osmand/osm/MapPoiTypes.java | 9 +- OsmAnd/AndroidManifest.xml | 1 - OsmAnd/res/layout/editing_poi.xml | 16 ++- OsmAnd/res/values/strings.xml | 14 +- .../src/net/osmand/plus/OsmandSettings.java | 2 +- .../activities/ShowRouteInfoActivity.java | 15 ++- .../osmedit/EditingPOIDialogProvider.java | 125 +++++++++++++----- .../osmedit/LocalOpenstreetmapActivity.java | 32 ----- .../osmand/plus/osmedit/OsmBugsDbHelper.java | 4 +- .../osmand/plus/osmedit/OsmEditingPlugin.java | 8 +- .../osmedit/SettingsOsmEditingActivity.java | 9 +- 11 files changed, 139 insertions(+), 96 deletions(-) delete mode 100644 OsmAnd/src/net/osmand/plus/osmedit/LocalOpenstreetmapActivity.java diff --git a/OsmAnd-java/src/net/osmand/osm/MapPoiTypes.java b/OsmAnd-java/src/net/osmand/osm/MapPoiTypes.java index aa982640fe..07cc006282 100644 --- a/OsmAnd-java/src/net/osmand/osm/MapPoiTypes.java +++ b/OsmAnd-java/src/net/osmand/osm/MapPoiTypes.java @@ -6,7 +6,6 @@ import java.io.InputStream; import java.util.ArrayList; import java.util.List; import java.util.Map; -import java.util.Set; import java.util.TreeMap; import net.osmand.PlatformUtil; @@ -77,14 +76,11 @@ public class MapPoiTypes { return otherCategory; } - public Map getAllTranslatedNames(boolean onlyTranslation) { + public Map getAllTranslatedNames() { Map translation = new TreeMap(); for(PoiCategory pc : categories) { for(PoiType pt : pc.getPoiTypes()) { translation.put(pt.getTranslation(), pt); - if (!onlyTranslation) { - translation.put(Algorithms.capitalizeFirstLetterAndLowercase(pt.getKeyName().replace('_', ' ')), pt); - } } } return translation; @@ -95,7 +91,8 @@ public class MapPoiTypes { for (PoiType pt : pc.getPoiTypes()) { translation.put(pt.getTranslation(), pt); if (!onlyTranslation) { - translation.put(pt.getKeyName(), pt); +// translation.put(pt.getKeyName(), pt); + translation.put(Algorithms.capitalizeFirstLetterAndLowercase(pt.getKeyName().replace('_', ' ')), pt); } } return translation; diff --git a/OsmAnd/AndroidManifest.xml b/OsmAnd/AndroidManifest.xml index 7b8f7210cb..fb72491c7c 100644 --- a/OsmAnd/AndroidManifest.xml +++ b/OsmAnd/AndroidManifest.xml @@ -240,7 +240,6 @@ - + + + + +