Hi,
For a project i'm working on I need a lot of maps from different places around the world zoomed to building level. I tried to use Google static map API and python to achieve that. I planned to divide the area I need and take multiple pictures in a for loop. But i don't know how to take the exact zone next to the previous one.
Here is my code:
import requests
apiKey = "YOUR_API_KEY"
url = "https://maps.googleapis.com/maps/api/staticmap?"
#center peut être égal soit au nom d'une ville, d'un pays, continent ou
{latitude,longitude}
center = "Binche"
zoom = 13
completeUrl = url + "center=" + center + "&zoom=" + str(zoom) + "&size=640x640&key=" +
apiKey + "&style=feature:all|element:labels|visibility:off"
r = requests.get(completeUrl)
with open(center + " Zoom " + str(zoom) + ".png", 'wb') as file:
file.write(r.content)
And here is my result:
Everything is good... Except i need a way bigger area. And to have an area this big I had to put the zoom value to 13 (i would like 20).
So, How could i have multiple pictures (or a single one) of a zone (~100Km). And another question would it cost a lot with this API ? If you think it's not possible and you have another idea feel free to write it :).
Thanks for your time !

I'm assuming that what you want to know is these:
1. How to load a static map of a large area
2. How much would it cost
Answer #1
You should check out this link to learn more about zoom levels.
Larger zoom levels does not mean a bigger area, in fact, it's the other way around.
So what you should do is to change your
zoomvalue lower.Answer #2
You should check out this link
The "per each use" here means per map LOAD. This means that regardless of the zoom levels that you use, you will only be billed per LOAD of the Static Maps API. That means if you load multiple static maps, you will be billed per map that you loaded. And it costs around 0.002 USD per LOAD if your load amount per month does not exceed 100,000. You can check the pricing table on the link I provided for more information.
Hope this helps.