support gpx routes by converting them to tracks

This commit is contained in:
vcoppe
2024-07-15 19:06:13 +02:00
parent a85beee1f0
commit 1d33607266
3 changed files with 71 additions and 5 deletions

View File

@@ -8,7 +8,7 @@ export function parseGPX(gpxData: string): GPXFile {
attributeNamePrefix: "",
attributesGroupName: 'attributes',
isArray: (name: string) => {
return name === 'trk' || name === 'trkseg' || name === 'trkpt' || name === 'wpt';
return name === 'trk' || name === 'trkseg' || name === 'trkpt' || name === 'wpt' || name === 'rte' || name === 'rtept' || name === 'gpxx:rpt';
},
attributeValueProcessor(attrName, attrValue, jPath) {
if (attrName === 'lat' || attrName === 'lon') {