From cc09923870ca9ba5aa85a7e96ab213dbea407b08 Mon Sep 17 00:00:00 2001 From: PaulStets Date: Thu, 11 Jan 2018 15:41:28 +0200 Subject: [PATCH] Added names to nautical locks --- OsmAnd-java/src/net/osmand/osm/edit/EntityParser.java | 3 +++ OsmAnd-java/src/net/osmand/osm/edit/OSMSettings.java | 1 + 2 files changed, 4 insertions(+) diff --git a/OsmAnd-java/src/net/osmand/osm/edit/EntityParser.java b/OsmAnd-java/src/net/osmand/osm/edit/EntityParser.java index bde65c3c56..4c8ff90f3d 100644 --- a/OsmAnd-java/src/net/osmand/osm/edit/EntityParser.java +++ b/OsmAnd-java/src/net/osmand/osm/edit/EntityParser.java @@ -41,6 +41,9 @@ public class EntityParser { if (mo.getName().length() == 0) { mo.setName(mo.getEnName(false)); } + if (mo.getName().length() == 0 && tags.containsKey(OSMTagKey.LOCK_NAME.getValue())) { + mo.setName(tags.get(OSMTagKey.LOCK_NAME.getValue())); + } if (mo.getLocation() == null) { LatLon l = null; if (mo instanceof Building) { diff --git a/OsmAnd-java/src/net/osmand/osm/edit/OSMSettings.java b/OsmAnd-java/src/net/osmand/osm/edit/OSMSettings.java index 90826bb7dc..7e7d23e865 100644 --- a/OsmAnd-java/src/net/osmand/osm/edit/OSMSettings.java +++ b/OsmAnd-java/src/net/osmand/osm/edit/OSMSettings.java @@ -5,6 +5,7 @@ public class OSMSettings { public enum OSMTagKey { NAME("name"), //$NON-NLS-1$ NAME_EN("name:en"), //$NON-NLS-1$ + LOCK_NAME("lock_name"), //$NON-NLS-1$ // ways HIGHWAY("highway"), //$NON-NLS-1$