13-11-2011

Google Maps for Rhino

Google Maps for Rhino

A while back Lorenz Lachauer posted a rhino.python script that used the OpenStreetMap API to obtain a background image, based on an address and zoom level entered by the user.
A problem that I encountered was that OpenStreetMap doesn’t resolve the address to the number of the house. After some probing around I noticed Google Maps had simplified their approach to the maps API, no need for developer keys and whatnot. So I took Lorenz’s code and adapted it for Google Maps. You can download it here. The obtained image is put in the root of “C:", but sometimes a user has no write permissions there and the script will fail. If this is the case, change the path to a location where the user has the right permissions, but be aware to use double backslashes like so: c:\temp\map_lat[…etc] => c:\temp\map_lat[…etc]