Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save brunophilipe/c0798411e6a405982435e85ed23b1fb3 to your computer and use it in GitHub Desktop.
Save brunophilipe/c0798411e6a405982435e85ed23b1fb3 to your computer and use it in GitHub Desktop.
Google Static Maps API Call
https://maps.googleapis.com/maps/api/staticmap?size=576x576&zoom=12&center=41.386162%2C%202.172800&style=feature%3Aall%7Cvisibility%3Aoff&style=feature%3Aroad%7Celement%3Ageometry%7Ccolor%3A0x000000%7Csaturation%3A0%7Cweight%3A0.2%7Cvisibility%3Aon&scale=2&key=YOUR_API_KEY
@Scvairy
Copy link

Scvairy commented Jan 25, 2020

Without urlencode it is more readable 👍
https://maps.googleapis.com/maps/api/staticmap?size=576x576&zoom=12&center=41.386162, 2.172800&style=feature:all|visibility:off&style=feature:road|element:geometry|color:0x000000|saturation:0|weight:0.2|visibility:on&scale=2&key=YOUR_API_KEY
And you can obtain your_api_key here: https://console.developers.google.com/flows/enableapi?apiid=static_maps_backend&keyType=CLIENT_SIDE&reusekey=true&pli=1

@PanKielbaska
Copy link

how can i obtain the key?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment