diff --git a/OsmAnd-java/test/resources/test_turn_lanes.json b/OsmAnd-java/test/resources/test_turn_lanes.json index 6e21286b4a..5adf85c731 100644 --- a/OsmAnd-java/test/resources/test_turn_lanes.json +++ b/OsmAnd-java/test/resources/test_turn_lanes.json @@ -631,7 +631,7 @@ "testName": "35.B 22 TR NEW 41", "params": { "vehicle": "car", - "short_way": "true", + "short_way": "true" }, "startPoint": { "latitude": 45.61344391190965, diff --git a/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuBuilder.java b/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuBuilder.java index 55af4578dd..7e59c56854 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuBuilder.java @@ -65,7 +65,8 @@ public class EditPOIMenuBuilder extends MenuBuilder { } for (Map.Entry e : point.getEntity().getTags().entrySet()) { - if (EditPoiData.POI_TYPE_TAG.equals(e.getKey())) { + if (EditPoiData.POI_TYPE_TAG.equals(e.getKey()) || + e.getKey().startsWith(EditPoiData.REMOVE_TAG_PREFIX)) { continue; } String text = e.getKey() + "=" + e.getValue(); diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapPoint.java b/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapPoint.java index b757b22d41..24ffc89fda 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapPoint.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapPoint.java @@ -2,6 +2,7 @@ package net.osmand.plus.osmedit; import net.osmand.osm.edit.Node; import net.osmand.osm.edit.OSMSettings.OSMTagKey; +import net.osmand.util.Algorithms; public class OpenstreetmapPoint extends OsmPoint { private static final long serialVersionUID = 729654300829771467L; @@ -26,7 +27,8 @@ public class OpenstreetmapPoint extends OsmPoint { public String getType() { String type = "amenity"; for (String k : entity.getTagKeySet()) { - if (!OSMTagKey.NAME.getValue().equals(k) && !OSMTagKey.OPENING_HOURS.getValue().equals(k)) { + if (!OSMTagKey.NAME.getValue().equals(k) && !OSMTagKey.OPENING_HOURS.getValue().equals(k) && + !k.startsWith(EditPoiData.REMOVE_TAG_PREFIX)) { type = k; break; } @@ -35,6 +37,9 @@ public class OpenstreetmapPoint extends OsmPoint { } public String getSubtype() { + if(Algorithms.isEmpty(getType())) { + return ""; + } return entity.getTag(this.getType()); }