From 09d3308ad4c39e137a7e2741b45a487b0bbf1791 Mon Sep 17 00:00:00 2001 From: Dmitrii Morozov Date: Thu, 5 Jun 2025 22:46:24 +0200 Subject: Simplify things --- index.html | 226 ++++++++++++++++++++++--------------------------------------- 1 file changed, 81 insertions(+), 145 deletions(-) diff --git a/index.html b/index.html index d885829..4e19d97 100755 --- a/index.html +++ b/index.html @@ -1,160 +1,96 @@ - + - - - Calimoto GPX to Google Maps - Smart Routing - + GPX to Google Directions -

Calimoto GPX to Google Maps Directions

-
- - -
-
-
- - + const points = rtepts.map(pt => ({ + lat: parseFloat(pt.getAttribute('lat')), + lon: parseFloat(pt.getAttribute('lon')) + })); + + const maxPoints = 25; + const sampled = interpolatePoints(points, maxPoints); + + const waypoints = sampled.map(p => `${p.lat},${p.lon}`).join('/'); + + const directionsUrl = `https://www.google.com/maps/dir/${waypoints}`; + + document.getElementById('output').innerHTML = + `Google Directions URL:
${directionsUrl}`; + }; + + reader.readAsText(file); + }); + - \ No newline at end of file + -- cgit v1.2.3