gpx-route-mapper-grok — a fully client-side OpenStreetMap tool for drawing routes with the mouse and exporting them as GPX.
- OpenStreetMap basemap via Leaflet
- Click-to-add points or freehand drag drawing
- Line smoothing (Catmull-Rom spline + iterative sharp-corner removal) via checkbox
- Google Maps–style search with autocomplete (start + optional destination)
- A / B markers on start and destination when both (or either) are set — geocoded with Nominatim
- Zoom + / − controls
- Export GPX (track) as a downloadable file — no server required
Any static file server works. Examples:
# Python
python3 -m http.server 8080
# Node
npx serve .Then open http://localhost:8080.
You can also open index.html directly in a browser; search may be limited by CORS depending on the environment. Serving over http://localhost is recommended.
- Search — type a place in Start (and optionally Destination). Pick a suggestion or press Find. The map pans/zooms and places green A / red B markers.
- Draw — use Click points to drop vertices, or Freehand to drag a path.
- Smooth — toggle Line smoothing to remove all sharp corners before export.
- Export GPX — prompts for a route name (prefilled from Start/Destination when set), then downloads a
.gpxtrack.
| Piece | Implementation |
|---|---|
| Map tiles | OpenStreetMap (tile.openstreetmap.org) |
| Geocoding | Nominatim public API (rate-limited; fine for personal use) |
| Drawing | Custom Leaflet mouse/touch handlers |
| Smoothing | Centripetal Catmull-Rom + iterative corner cuts until turns ≤ ~6° |
| GPX | Generated as XML and downloaded via Blob |
No backend, API keys, or build step required.
Please respect Nominatim usage policy: debounce is already applied; do not hammer the service with bulk/automated geocoding.
MIT — use freely for personal or commercial projects.