TCX Laps to GeoJSON Markers
13 linesJSON.stringify({
"type": "FeatureCollection",
"features": [...tcx.matchAll(/<Lap[^]+?<Position>[^]*?<LatitudeDegrees>(.+)<\/[^]*?<LongitudeDegrees>(.+)<\//g)].map(([_, lat, lng]) => ({
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [
+lng, +lat
]
}
}))
})