samedi 27 juin 2015

Handling image from Google Maps APIs (staticmap)

I am trying to get an image from GoogleMaps APIs, more precisely from the staticmap API.
The problem is that in other APIs from GoogleMaps you can choose wether you want your info from the API in JSON or XML, but with staticmap (which returns an image) it seems you can't. So I don't know how to handle the image provided by the URL since I don't know how it is coded.

This is what I´m trying to do:

import requests

url = ("http://ift.tt/1Km9kHo")
response = requests.get(url)
print(response.json())

Hope you've got any advice about how to turn the response into something usable

Aucun commentaire:

Enregistrer un commentaire