Changeset 3268 in josm for trunk/src


Ignore:
Timestamp:
2010-05-22T19:02:48+02:00 (9 years ago)
Author:
stoecker
Message:

improve naming of relations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java

    r3083 r3268  
    1818import org.openstreetmap.josm.data.osm.Node;
    1919import org.openstreetmap.josm.data.osm.OsmPrimitive;
     20import org.openstreetmap.josm.data.osm.OsmUtils;
    2021import org.openstreetmap.josm.data.osm.Relation;
    2122import org.openstreetmap.josm.data.osm.RelationMember;
     
    4849
    4950    /** the default list of tags which are used as naming tags in relations */
    50     static public final String[] DEFAULT_NAMING_TAGS_FOR_RELATIONS = {"name", "ref", "restriction", "public_transport", ":LocationCode", "note"};
     51    static public final String[] DEFAULT_NAMING_TAGS_FOR_RELATIONS = {"name", "ref", "restriction", "landuse", "natural",
     52    "public_transport", ":LocationCode", "note"};
    5153
    5254    /** the current list of tags used as naming tags in relations */
     
    166168            if (name == null) {
    167169                name = (relation.get("public_transport") != null) ? tr("public transport") : "";
     170            }
     171            if (name == null) {
     172                String building  = relation.get("building");
     173                if(OsmUtils.isTrue(building))
     174                    name = tr("building");
     175                else if(building != null)
     176                    name = tr(building); // translate tag!
    168177            }
    169178            if (name == null) {
Note: See TracChangeset for help on using the changeset viewer.