Python Forum

Full Version: Best way to map trajectory data on Google Maps
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a single csv file containing latitudes and longitudes coordinates of trajectories by multiple objects. I wish to plot those trajectories on a single google map using the python driver for google maps. I am not sure what feature of Google Maps would work best to get this done. What allows me to efficiently map trajectory data? Can you show me any examples?
Roughly, your path to solve the problem should look like the following:

1) Get Google map API key
2) Create index.html and add a google map instance as shown in Google map docs (examples)
3) Serve your csv-data (using Python), or add csv-data directly to index.html (e.g. convert to json-object, or parse csv-string using d3.js, etc.)
4) Use javascript to add objects to the map (you need to explore google map docs/examples)
5) finally, you can serve your index.html and data.csv somewhere (e.g. github pages) as static files.

However, you can use django/flask etc. to serve your index.html and data.csv (but this is another story);