Changeset 3386 in josm
- Timestamp:
- 2010-07-25T21:18:01+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java
r3374 r3386 20 20 import org.openstreetmap.josm.data.gpx.GpxLink; 21 21 import org.openstreetmap.josm.data.gpx.WayPoint; 22 import org.openstreetmap.josm.data.preferences.StringProperty; 22 23 import org.openstreetmap.josm.gui.MapView; 23 24 import org.openstreetmap.josm.tools.ImageProvider; … … 94 95 */ 95 96 public static LinkedList<MarkerProducers> markerProducers = new LinkedList<MarkerProducers>(); 97 98 private static final StringProperty PROP_NAME_DESC = new StringProperty( "draw.gpx.layer.wpt", "nameordesc" ); 96 99 97 100 // Add one Maker specifying the default behaviour. … … 116 119 117 120 String name_desc = ""; 118 if (wpt.attr.containsKey("name")) { 119 name_desc = wpt.getString("name"); 120 } else if (wpt.attr.containsKey("desc")) { 121 name_desc = wpt.getString("desc"); 121 if (PROP_NAME_DESC.get() == null || "nameordesc".equals(PROP_NAME_DESC.get())) 122 { 123 if (wpt.attr.containsKey("name")) { 124 name_desc = wpt.getString("name"); 125 } else if (wpt.attr.containsKey("desc")) { 126 name_desc = wpt.getString("desc"); 127 } 128 } else if ("name".equals(PROP_NAME_DESC.get())) { 129 if (wpt.attr.containsKey("name")) { 130 name_desc = wpt.getString("name"); 131 } 132 } 133 else if ("desc".equals(PROP_NAME_DESC.get())) { 134 if (wpt.attr.containsKey("desc")) { 135 name_desc = wpt.getString("desc"); 136 } 137 } 138 else if ("both".equals(PROP_NAME_DESC.get()) ) { 139 if (wpt.attr.containsKey("name")) { 140 name_desc = wpt.getString("name"); 141 142 if (wpt.attr.containsKey("desc")) { 143 name_desc += " (" + wpt.getString("desc") + ")" ; 144 } 145 } else if (wpt.attr.containsKey("desc")) { 146 name_desc = wpt.getString("desc"); 147 } 122 148 } 123 149
Note:
See TracChangeset
for help on using the changeset viewer.