Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPX Route Mapper (by Grok)

gpx-route-mapper-grok — a fully client-side OpenStreetMap tool for drawing routes with the mouse and exporting them as GPX.

Features

  • 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

Run locally

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.

Usage

  1. 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.
  2. Draw — use Click points to drop vertices, or Freehand to drag a path.
  3. Smooth — toggle Line smoothing to remove all sharp corners before export.
  4. Export GPX — prompts for a route name (prefilled from Start/Destination when set), then downloads a .gpx track.

Tech notes

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.

Nominatim usage

Please respect Nominatim usage policy: debounce is already applied; do not hammer the service with bulk/automated geocoding.

License

MIT — use freely for personal or commercial projects.

About

GPX Route Mapper (Grok) — client-side OpenStreetMap tool to draw routes with the mouse and export GPX

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages