Merge pull request #4910 from osmandapp/PaulsBranch

Added names to nautical locks
This commit is contained in:
vshcherb 2018-01-11 15:02:20 +01:00 committed by GitHub
commit b16e9f9ce2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -41,6 +41,9 @@ public class EntityParser {
if (mo.getName().length() == 0) { if (mo.getName().length() == 0) {
mo.setName(mo.getEnName(false)); 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) { if (mo.getLocation() == null) {
LatLon l = null; LatLon l = null;
if (mo instanceof Building) { if (mo instanceof Building) {

View file

@ -5,6 +5,7 @@ public class OSMSettings {
public enum OSMTagKey { public enum OSMTagKey {
NAME("name"), //$NON-NLS-1$ NAME("name"), //$NON-NLS-1$
NAME_EN("name:en"), //$NON-NLS-1$ NAME_EN("name:en"), //$NON-NLS-1$
LOCK_NAME("lock_name"), //$NON-NLS-1$
// ways // ways
HIGHWAY("highway"), //$NON-NLS-1$ HIGHWAY("highway"), //$NON-NLS-1$