LeafletPlayback icon indicating copy to clipboard operation
LeafletPlayback copied to clipboard

Add CSV Support

Open hallahan opened this issue 10 years ago • 3 comments

Allow the ability to load tracks from a CSV file.

hallahan avatar May 17 '14 16:05 hallahan

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?

JulioV avatar May 17 '14 17:05 JulioV

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?

hallahan avatar May 19 '14 05:05 hallahan

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.

hallahan avatar May 20 '14 02:05 hallahan