Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

2 Answers 2

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. http://www.gdal.org/ogr2ogr.html

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.