Question

I want to create simple upload form on my django site where users could upload their gpx files but I want to give them possibility to preview their points and lines on map before they proceed with submiting it. I have some basic knowledge of working with django forms but I'm not sure how to convert that gpx data and display it on map. I hope you can tell me at least where to start because I'm completely out of ideas. Thanks

Was it helpful?

Solution

Well, if you use Django then you could probably extend it with Geodjango which provides you easy and nice way to create geometry fields for your models (points,lines, poligons).

In case you decide to use Geodjango for this purpose then please check my blog post http://ipasic.com/article/uploading-parsing-and-saving-gpx-data-postgis-geodjango/

I've described there process of uploading,parsing and saving gpx file to spatial database (like Postgis).It could help you to get an idea. I didn't describe how to display it on map but it shouldn't be problem. I would recommend you to use Leaflet or some other javascript mapping library for it. However, that's to much for writing right now.

I hope that helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top