views:

49

answers:

2

Hello, Programaticly, I need to include a google Maps map to automaticly generated pdf files. For this, I need to convert the map into some image format (jpg, png etc). How can it be done ?

I am using Python and Django if build in google maps library is not sufficient.

Thanks

A: 

You can use the Google Maps Static API to return an image of the map. It's a very easy, REST-like API that doesn't even require a key. Example:

http://maps.google.com/maps/api/staticmap?center=51.477222,0&zoom=14&size=400x400&sensor=false

Dan Diplo
+3  A: 

I think the only way is to import images into the PDF, the images coming from the Google Maps static API.

However, it's going to collide with their T & C:

License Restrictions. Except as expressly permitted under the Terms, or unless you have received prior written authorization from Google (or, as applicable, from the provider of particular Content), Google's licenses above are subject to your adherence to all of the restrictions below. Except as explicitly permitted in Section 7 or the Maps APIs Documentation, you must not (nor may you permit anyone else to):

(yada yada)

10.2 copy, translate, modify, create a derivative work of, or publicly display any Content or any part thereof (for example, the following are prohibited: (a) creating server-side modification of map tiles; and (b) stitching multiple static map images together to display a map that is larger than permitted in the Maps APIs Documentation);

10.8 use the Static Maps API other than in an implementation in a web browser;

Pekka