From 43f4511ded70bc1073fd6412df454370227b2a5c Mon Sep 17 00:00:00 2001 From: vcoppe Date: Sat, 27 Apr 2024 11:33:14 +0200 Subject: [PATCH] fix export --- gpx/src/gpx.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gpx/src/gpx.ts b/gpx/src/gpx.ts index 77dbb721..c44cb2d1 100644 --- a/gpx/src/gpx.ts +++ b/gpx/src/gpx.ts @@ -443,7 +443,7 @@ export class TrackSegment extends GPXTreeLeaf { toTrackSegmentType(): TrackSegmentType { return { - trkpt: this.trkpt + trkpt: this.trkpt.map((point) => point.toTrackPointType()) }; } @@ -516,6 +516,15 @@ export class TrackPoint { } this.extensions["gpxtpx:TrackPointExtension"]["gpxtpx:Extensions"]["surface"] = surface; } + + toTrackPointType(): TrackPointType { + return { + attributes: this.attributes, + ele: this.ele, + time: this.time, + extensions: this.extensions, + }; + } }; export class Waypoint {