Changeset 541 in josm for trunk/src/org
- Timestamp:
- 2008-02-15T19:29:28+01:00 (17 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java
r444 r541 1 // License: GPL. Copyright 200 7by Immanuel Scholz and others1 // License: GPL. Copyright 2008 by Immanuel Scholz and others 2 2 package org.openstreetmap.josm.gui.layer.markerlayer; 3 3 … … 87 87 88 88 // Try a relative file:// url, if the link is not in an URL-compatible form 89 90 89 if (relativePath != null && uri != null && !isWellFormedAddress(uri)) 90 uri = new File(relativePath, uri).toURI().toString(); 91 91 92 if (uri == null) 93 return new Marker(wpt.latlon, wpt.getString("name"), wpt.getString("symbol")); 94 if (uri.endsWith(".wav")) 95 return AudioMarker.create(wpt.latlon, uri); 96 else if (uri.endsWith(".png") || uri.endsWith(".jpg") || uri.endsWith(".jpeg") || uri.endsWith(".gif")) 92 if (uri == null) { 93 String name_desc = ""; 94 if (wpt.attr.containsKey("name")) { 95 name_desc = wpt.getString("name"); 96 } else if (wpt.attr.containsKey("desc")) { 97 name_desc = wpt.getString("desc"); 98 } 99 return new Marker(wpt.latlon, name_desc, wpt.getString("symbol")); 100 } 101 102 if (uri.endsWith(".wav")) 103 return AudioMarker.create(wpt.latlon, uri); 104 else if (uri.endsWith(".png") || uri.endsWith(".jpg") || uri.endsWith(".jpeg") || uri.endsWith(".gif")) 97 105 return ImageMarker.create(wpt.latlon, uri); 98 106 else -
trunk/src/org/openstreetmap/josm/io/GpxReader.java
r512 r541 237 237 currentState = states.pop(); 238 238 currentTrackSeg.add(currentWayPoint); 239 if (currentWayPoint.attr.containsKey("name") || currentWayPoint.attr.containsKey("desc")) { 240 currentData.waypoints.add(currentWayPoint); 241 } 239 242 } else if (qName.equals("wpt")) { 240 243 currentState = states.pop();
Note:
See TracChangeset
for help on using the changeset viewer.