From b73e912e231c3f5085f3678238b3341b1df14e1f Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Fri, 12 Aug 2016 22:54:33 +0200 Subject: [PATCH] Fix atm amenity --- OsmAnd-java/src/net/osmand/binary/BinaryInspector.java | 6 +++--- OsmAnd-java/src/net/osmand/osm/MapPoiTypes.java | 6 +++--- OsmAnd-java/src/net/osmand/osm/PoiType.java | 7 +++++++ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java b/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java index e3b11404aa..10a3192088 100644 --- a/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java +++ b/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java @@ -71,15 +71,15 @@ public class BinaryInspector { // test cases show info if ("test".equals(args[0])) { in.inspector(new String[]{ -// "-vpoi", + "-vpoi", // "-vmap", "-vmapobjects", // "-vmapcoordinates", -// "-vrouting", + "-vrouting", // "-vaddress", "-vcities","-vstreetgroups", // "-vstreets", "-vbuildings", "-vintersections", // "-lang=ru", // "-bbox=4.8486,52.3084,4.8747,52.2970", // "-osm="+System.getProperty("maps.dir")+"/map.obf.osm", - System.getProperty("maps.dir")+"/Gb_england_europe_simple.obf" + System.getProperty("maps.dir")+"/Map.obf" }); } else { in.inspector(args); diff --git a/OsmAnd-java/src/net/osmand/osm/MapPoiTypes.java b/OsmAnd-java/src/net/osmand/osm/MapPoiTypes.java index 1b6c501414..328d20d842 100644 --- a/OsmAnd-java/src/net/osmand/osm/MapPoiTypes.java +++ b/OsmAnd-java/src/net/osmand/osm/MapPoiTypes.java @@ -575,10 +575,10 @@ public class MapPoiTypes { if (!p.isReference()) { String key = null; if (p.isAdditional()) { - key = p.isText() ? p.getOsmTag() : - (p.getOsmTag() + "/" + p.getOsmValue()); + key = p.isText() ? p.getRawOsmTag() : + (p.getRawOsmTag() + "/" + p.getOsmValue()); } else { - key = p.getOsmTag() + "/" + p.getOsmValue(); + key = p.getRawOsmTag() + "/" + p.getOsmValue(); } if (poiTypesByTag.containsKey(key)) { throw new UnsupportedOperationException("!! Duplicate poi type " + key); diff --git a/OsmAnd-java/src/net/osmand/osm/PoiType.java b/OsmAnd-java/src/net/osmand/osm/PoiType.java index faea63fe10..dce5430fd9 100644 --- a/OsmAnd-java/src/net/osmand/osm/PoiType.java +++ b/OsmAnd-java/src/net/osmand/osm/PoiType.java @@ -47,6 +47,13 @@ public class PoiType extends AbstractPoiType { } return osmTag; } + + public String getRawOsmTag() { + if(isReference()) { + return referenceType.getOsmTag(); + } + return osmTag; + } public void setOsmTag(String osmTag) { this.osmTag = osmTag;