Merge pull request #4511 from osmandapp/incorrect_gpx_distance
Fix #4478
This commit is contained in:
commit
2ed82146c7
1 changed files with 14 additions and 13 deletions
|
@ -1012,7 +1012,6 @@ public class GPXUtilities {
|
|||
}
|
||||
|
||||
private void removeGeneralTrackIfExists() {
|
||||
Track generalTrack = getGeneralTrack();
|
||||
if (generalTrack != null) {
|
||||
tracks.remove(generalTrack);
|
||||
this.generalTrack = null;
|
||||
|
@ -1202,20 +1201,22 @@ public class GPXUtilities {
|
|||
"http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd");
|
||||
|
||||
for (Track track : file.tracks) {
|
||||
serializer.startTag(null, "trk"); //$NON-NLS-1$
|
||||
writeNotNullText(serializer, "name", track.name);
|
||||
writeNotNullText(serializer, "desc", track.desc);
|
||||
for (TrkSegment segment : track.segments) {
|
||||
serializer.startTag(null, "trkseg"); //$NON-NLS-1$
|
||||
for (WptPt p : segment.points) {
|
||||
serializer.startTag(null, "trkpt"); //$NON-NLS-1$
|
||||
writeWpt(format, serializer, p);
|
||||
serializer.endTag(null, "trkpt"); //$NON-NLS-1$
|
||||
if (!track.generalTrack) {
|
||||
serializer.startTag(null, "trk"); //$NON-NLS-1$
|
||||
writeNotNullText(serializer, "name", track.name);
|
||||
writeNotNullText(serializer, "desc", track.desc);
|
||||
for (TrkSegment segment : track.segments) {
|
||||
serializer.startTag(null, "trkseg"); //$NON-NLS-1$
|
||||
for (WptPt p : segment.points) {
|
||||
serializer.startTag(null, "trkpt"); //$NON-NLS-1$
|
||||
writeWpt(format, serializer, p);
|
||||
serializer.endTag(null, "trkpt"); //$NON-NLS-1$
|
||||
}
|
||||
serializer.endTag(null, "trkseg"); //$NON-NLS-1$
|
||||
}
|
||||
serializer.endTag(null, "trkseg"); //$NON-NLS-1$
|
||||
writeExtensions(serializer, track);
|
||||
serializer.endTag(null, "trk"); //$NON-NLS-1$
|
||||
}
|
||||
writeExtensions(serializer, track);
|
||||
serializer.endTag(null, "trk"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
for (Route track : file.routes) {
|
||||
|
|
Loading…
Reference in a new issue