Google, Maps, and Python
I’ve been rationalizing my database of CSC49X project participants, and want to update the map that appears on this site’s home page. I’m going to have to do this every three or four months, so I’d like a simple Python script that takes a bunch of latitudes and longitudes, and gives me back a map with those locations mapped (bonus marks if I can also specify the colors of the markers, to differentiate people by year or role). I know Google Maps and other services will let me do this, but I don’t have a couple of hours to spend trawling through the results of a search for “google maps python” or the like. If you have something that’ll solve my problem, I’d be grateful for a ping.
And this gives me an excuse to make yet another suggestion to the good folks at Google. I can already use “define: patacriticism” to search for word definitions. How come I can’t use “python: map API” to search for the words “map” and “API” in the documentation for Python code? I’m told by reliable sources that it would be easy to implement; it’d be a very useful thing to have on the intranet search box of any software development shop, and most importantly, it’d give open source developers an incentive to start documenting their code a little better. Right now, the payoff for doing so is fuzzy and remote; if people could google APIs that exactly, well, I don’t think it could hurt…
I have a solution that you might be interested in. It just uses python to produce javascript to use the google API in a Zope Page Template. But it’s really none too zopish so I suspect you can use it aywhere.
I’ve written an app, that converts a track from GPS on google maps, and sets markers, where some photos were made. So I think this should really be easy to change to your needs.
Please email me, if you want it.
I forgot to mention, that you can look at the result here: http://www.eglseer.cc/tours/
Andreas -
I’d love to see that code but your site doesn’t seem to be up anymore. I want to take GPS data from my watch (xml), store it in a db and display it via google maps. I’m new to python and could use some mapping examples.