Import routes elevation and time information (#95)

* Import routes elevation and time information

* map routepoint to trackpoint explicitly

---------

Co-authored-by: vcoppe <vianney.coppe@gmail.com>
This commit is contained in:
Pierre Donias
2024-09-13 18:48:22 +02:00
committed by GitHub
parent 3c7f78ae38
commit ec7629aea7
2 changed files with 257 additions and 2 deletions

View File

@@ -104,7 +104,7 @@ abstract class GPXTreeLeaf extends GPXTreeElement<GPXTreeLeaf> {
}
// A class that represents a GPX file
export class GPXFile extends GPXTreeNode<Track>{
export class GPXFile extends GPXTreeNode<Track> {
[immerable] = true;
attributes: GPXFileAttributes;
@@ -1586,6 +1586,8 @@ function convertRouteToTrack(route: RouteType): Track {
} else {
segment.trkpt.push(new TrackPoint({
attributes: rpt.attributes,
ele: rpt.ele,
time: rpt.time,
}));
}
});
@@ -1594,4 +1596,4 @@ function convertRouteToTrack(route: RouteType): Track {
}
return track;
}
}