Changeset 4831 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2012-01-20T22:00:13+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java
r4751 r4831 32 32 import org.openstreetmap.josm.data.coor.LatLon; 33 33 import org.openstreetmap.josm.data.gpx.GpxData; 34 import org.openstreetmap.josm.data.gpx.GpxLink; 34 35 import org.openstreetmap.josm.data.gpx.WayPoint; 35 36 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; … … 77 78 this.fromLayer = fromLayer; 78 79 double firstTime = -1.0; 80 String lastLinkedFile = ""; 79 81 80 82 for (WayPoint wpt : indata.waypoints) { 83 /* calculate time differences in waypoints */ 81 84 double time = wpt.time; 82 if (firstTime < 0) { 85 boolean wpt_has_link = wpt.attr.containsKey(GpxData.META_LINKS); 86 if (firstTime < 0 && wpt_has_link) { 83 87 firstTime = time; 88 for (GpxLink oneLink : (Collection<GpxLink>) wpt.attr.get(GpxData.META_LINKS)) { 89 lastLinkedFile = oneLink.uri; 90 break; 91 } 92 } 93 if (wpt_has_link) { 94 for (GpxLink oneLink : (Collection<GpxLink>) wpt.attr.get(GpxData.META_LINKS)) { 95 if (!oneLink.uri.equals(lastLinkedFile)) { 96 firstTime = time; 97 } 98 lastLinkedFile = oneLink.uri; 99 break; 100 } 84 101 } 85 102 Marker m = Marker.createMarker(wpt, indata.storageFile, this, time, time - firstTime);
Note:
See TracChangeset
for help on using the changeset viewer.