2

I have the following Google Developer Console APIs with ON status:

  • Google Maps Embed API
  • Google Maps Javascript API v3
  • Static Maps API
  • BigQuery AP
  • Google Cloud SQL
  • Google Cloud Storage
  • Google Cloud Storage JSON API

I have the following link in an HTML email:

<img src='http://maps.google.com/staticmap?center=-15,-47&zoom=11&size=600x200&key=myKey'/>

But I never get an image. The key works OK for an embedded map using an iframe.

What am I doing wrong?

Daerst
  • 954
  • 7
  • 24
Miguel
  • 35
  • 1
  • 7

2 Answers2

1

If you are using Google static Map API, you should use this URL:

http://maps.googleapis.com/maps/api/staticmap?center=-15,-47&zoom=11&size=600x200&key=myKey

Of course, replace 'myKey' to your valid key.

Quickpick
  • 163
  • 6
0

It won't work because you're trying to put it in an email, browsers work differently to email clients. Email clients block iframes for security purposes, see:

Is there no way to embed a Google Map into an HTML email?

You can check if your api key is working using the Google Maps API console https://code.google.com/apis/console/?pli=1

Update

also you might want to update the bit of the string 'myKey' with your api key :)

Community
  • 1
  • 1
Pixelomo
  • 6,373
  • 4
  • 47
  • 57