Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to use the leaflet.draw plugin to allow users to digitize vectors on the map. At the end the data should be downloadable as a GPX-file.

Is there any sample that shows how this can be done?

share|improve this question
Do you want a set of waypoints, a route (plan for what to do) or a track (record of what happened)? Do you need time association with these points / vectors? – BradHards Jan 13 '13 at 8:29

It can be done with OpenLayers. You can use OpenLayers.Format.GPX to read/write GPX files. Leaflet Supports reading GPX files through plugins but i'm not sure if it supports writing as well.

share|improve this answer

If processing on the serverside is an option you can consider using ogr2ogr, which supports geojson and gpx.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.