adds trail preview on high map zoom

This commit is contained in:
Christian Beutel
2025-08-22 15:41:34 +02:00
parent 33776ad42c
commit 380c1802f2
7 changed files with 164 additions and 67 deletions

View File

@@ -104,7 +104,7 @@ export async function calculateRouteBetween(startLat: number, startLon: number,
const points = decodePolyline(shape);
const startTime = new Date().getTime();
const waypoints = points.map((p, i) => new Waypoint({ $: { lat: p[0], lon: p[1] }, ele: heightResponse.height[i], time: new Date(startTime + (((duration * 1000) / points.length) * i)) }))
const waypoints = points.map((p, i) => new Waypoint({ $: { lat: p[1], lon: p[0] }, ele: heightResponse.height[i], time: new Date(startTime + (((duration * 1000) / points.length) * i)) }))
return waypoints
}