Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2017-04-25 10:06:43 +02:00
commit 8d978f2048
3 changed files with 9 additions and 3 deletions

View file

@ -631,7 +631,7 @@
"testName": "35.B 22 TR NEW 41", "testName": "35.B 22 TR NEW 41",
"params": { "params": {
"vehicle": "car", "vehicle": "car",
"short_way": "true", "short_way": "true"
}, },
"startPoint": { "startPoint": {
"latitude": 45.61344391190965, "latitude": 45.61344391190965,

View file

@ -65,7 +65,8 @@ public class EditPOIMenuBuilder extends MenuBuilder {
} }
for (Map.Entry<String, String> e : point.getEntity().getTags().entrySet()) { for (Map.Entry<String, String> 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; continue;
} }
String text = e.getKey() + "=" + e.getValue(); String text = e.getKey() + "=" + e.getValue();

View file

@ -2,6 +2,7 @@ package net.osmand.plus.osmedit;
import net.osmand.osm.edit.Node; import net.osmand.osm.edit.Node;
import net.osmand.osm.edit.OSMSettings.OSMTagKey; import net.osmand.osm.edit.OSMSettings.OSMTagKey;
import net.osmand.util.Algorithms;
public class OpenstreetmapPoint extends OsmPoint { public class OpenstreetmapPoint extends OsmPoint {
private static final long serialVersionUID = 729654300829771467L; private static final long serialVersionUID = 729654300829771467L;
@ -26,7 +27,8 @@ public class OpenstreetmapPoint extends OsmPoint {
public String getType() { public String getType() {
String type = "amenity"; String type = "amenity";
for (String k : entity.getTagKeySet()) { 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; type = k;
break; break;
} }
@ -35,6 +37,9 @@ public class OpenstreetmapPoint extends OsmPoint {
} }
public String getSubtype() { public String getSubtype() {
if(Algorithms.isEmpty(getType())) {
return "";
}
return entity.getTag(this.getType()); return entity.getTag(this.getType());
} }