Changeset 5393 in josm
- Timestamp:
- 2012-08-04T21:18:23+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/GpxWriter.java
r2907 r5393 161 161 private void writeTracks() { 162 162 for (GpxTrack trk : data.tracks) { 163 open("trk"); 163 openln("trk"); 164 164 writeAttr(trk.getAttributes()); 165 165 for (GpxTrackSegment seg : trk.getSegments()) { … … 190 190 191 191 private void inline(String tag, String attributes) { 192 out.println(indent + "<" + tag + " " + attributes + " 192 out.println(indent + "<" + tag + " " + attributes + "/>"); 193 193 } 194 194 … … 248 248 if (pnt != null) { 249 249 LatLon c = pnt.getCoor(); 250 openAtt(type, "lat=\"" + c.lat() + "\" lon=\"" + c.lon() + "\""); 251 writeAttr(pnt.attr); 252 closeln(type); 250 String coordAttr = "lat=\"" + c.lat() + "\" lon=\"" + c.lon() + "\""; 251 if (pnt.attr.isEmpty()) { 252 inline(type, coordAttr); 253 } else { 254 openAtt(type, coordAttr); 255 writeAttr(pnt.attr); 256 closeln(type); 257 } 253 258 } 254 259 }
Note:
See TracChangeset
for help on using the changeset viewer.