Created
October 31, 2024 17:47
-
-
Save JanDW/a55c8378382ec30c78b56c3d0ccd2a56 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return { | |
fileName: gpxFile, | |
// gpxString: gpxStringClean, | |
trkName, | |
totalDistance: totalDistance.toFixed(2), | |
startWaypoint: { | |
name: startWaypoint.getElementsByTagName('name')[0]?.textContent, | |
lat: startWaypoint.getAttribute('lat'), | |
lon: startWaypoint.getAttribute('lon'), | |
ele: startWaypoint.getElementsByTagName('ele')[0]?.textContent, | |
time: startWaypoint.getElementsByTagName('time')[0]?.textContent, | |
}, | |
endWaypoint: { | |
name: endWaypoint.getElementsByTagName('name')[0]?.textContent, | |
lat: endWaypoint.getAttribute('lat'), | |
lon: endWaypoint.getAttribute('lon'), | |
ele: endWaypoint.getElementsByTagName('ele')[0]?.textContent, | |
time: endWaypoint.getElementsByTagName('time')[0]?.textContent, | |
}, | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment