LeafletPlayback
LeafletPlayback copied to clipboard
Add CSV Support
Allow the ability to load tracks from a CSV file.
I think a parser from CSV to GeoJSON could be build for this and other formats. In that way the core plug-in's code doesn't have to be changed. Thoughts?
There might not be too much of a difference between the two approaches.
I'm actually thinking it would be fairly straightforward to extend the core plug-in to handle CSV / GPX. Though GeoJSON is a standard, when it comes to GPS tracks it is not. Almost always I find it to be CSV, GPX, or KML from tracks.
In essence, to get things working as-is right now, we just need to make an array of coordinates and timestamps from the given CSV file. Do you see any disadvantages to directly parsing CSV / GPX this way?
I added GPX support. Next I will give CSV a try. Let me know if there are any issues. I took your advice and melded the GPX into the same form as the GeoJSON using jQuery.