Google sstatic map error

Since after the hasss.io update I have issues with google static map. Can really blame the update as originally it worked than displayed an ! icon latter. Streetview still works. Looking for others with same issue or proper format to add api/key to the static map.

Static Map:

#camera 2:
  - platform: generic
    name: Kelsey
    still_image_url: https://maps.googleapis.com/maps/api/staticmap?center={{ states.device_tracker['10568'].attributes.latitude }},{{ states.device_tracker['10568'].attributes.longitude }}&zoom=15&size=500x500&maptype=roadmap&markers=color:red%7Clabel:S%7C{{ states.device_tracker['10568'].attributes.latitude }},{{ states.device_tracker['10568'].attributes.longitude }}

Street View

#camera 10:
  - platform: generic
    name: Kaylee Streetview
    still_image_url: https://maps.googleapis.com/maps/api/streetview?location={{ states.device_tracker['10598'].attributes.latitude }},{{ states.device_tracker['10598'].attributes.longitude }}&size=456x456&key=**HIDDEN**

Try adding your api key to your camera 2 url. That’s what fixed the issue for me.

#camera 2:
  - platform: generic
    name: Kelsey
    still_image_url: https://maps.googleapis.com/maps/api/staticmap?center={{ states.device_tracker['10568'].attributes.latitude }},{{ states.device_tracker['10568'].attributes.longitude }}&zoom=15&size=500x500&maptype=roadmap&markers=color:red%7Clabel:S%7C{{ states.device_tracker['10568'].attributes.latitude }},{{ states.device_tracker['10568'].attributes.longitude }}&key=YOURAPIKEYHERE

Yes I tried that multiple times in multiple positions, hence why I asked for a proper format as when I add the key instead of the ! I get Kelsey(Error loading image)

Why is your reply code coloured formated while mine is all 1 colour? Is it not paste, </> preformatted text, " blockquote?

Actually I’m going to blame this on Chrome, I get the exclamation mark in every example outside of Hass.io. At googles site https://developers.google.com/maps/documentation/static-maps/intro
and at http://staticmapmaker.com/google/ . Which has other mappers that all work except Google. I need to try another web browser and see if that works.

NONE of my browsers show google maps at any of those two locations just the !

I had the same issue as you, and mine was because I exhausted the number of API calls allowed without using a key. Mine showed the ! when I went to the URL in Chrome as well as Home Assistant. After adding the API key to the end of the URL like &key=YOURAPIKEYHERE, it started working. Maybe it’s worth requesting a new API key from https://developers.google.com/maps/documentation/static-maps/intro?

Mine looks like this after adding my api key:

- platform: generic
  name: Me
  still_image_url: https://maps.googleapis.com/maps/api/staticmap?size=500x500&zoom=13&maptype=roadmap&markers=color:green|label:M|{{ states.device_tracker.me.attributes.latitude }},{{ states.device_tracker.me.attributes.longitude }}&key=00000000000000000000000000000
  limit_refetch_to_url_change: true

To get yaml syntax highlighting, use this format when composing your post instead of pre-formatted text.

```yaml
#camera 2:
  - platform: generic
    name: Kelsey
    still_image_url: https://maps.googleapis.com/maps/api/staticmap?center={{ states.device_tracker['10568'].attributes.latitude }},{{ states.device_tracker['10568'].attributes.longitude }}&zoom=15&size=500x500&maptype=roadmap&markers=color:red%7Clabel:S%7C{{ states.device_tracker['10568'].attributes.latitude }},{{ states.device_tracker['10568'].attributes.longitude }}&key=YOURAPIKEYHERE
```

Thank you, though I may have figured it all out on my own. (another 8 hours seems right) It is always better to get someone else’s perspective as I did not know where the error was coming from.

It seems the streetview api is not the same as the static map api, so I did indeed get one. I do not know what the limit is without the api but it seems I crossed that threshold. Your example worked without the api and is smaller than the one I’m using so now I need to see what the difference is in both and will probably change to your example.