Google map in a smart chart

Hello,
I would like to know if it is possible to create a google map via the <iframe> tag in Smart Charts, because I have this error:
Google Maps Platform has rejected your request. Google has disabled the use of the Maps API for this site. Learn more: http://www.google.com/help/terms_maps.html
Is there any way to fix this or map it using another method?
Thanks in advance.

Hello @jacques_liao,

Iā€™m not sure to know exactly what happen here. Do you define your Map ? I just found this documentation about embedded Google maps and it should work I guess.

Can you share the code you use to integrate your Google Maps ?

Kind regards,
Morgan

Hello,
For the code I used exactly the same as the one in the doc you just sent:

<iframe
   width = "600"
   height = "450"
   style = "border: 0"
   loading = "lazy"
   allowfullscreen
   src = "https://www.google.com/maps/embed/v1/place?key=API_KEY
     & q = Space + Needle, Seattle + WA ">
</iframe>

and suddenly when I put my API_KEY and I run with the code it gives me the following error:

Hey again,

In the following doc you can see that you need to define referrer web sites.

Specify one or more referrer web sites. For example, *.google.com accepts all sites ending in google.com , such as https://developers.google.com .

https://developers.google.com/maps/documentation/embed/get-api-key

So you need to configure https://app.forestadmin.com/ or *.forestadmin.com in the referrer web sites of the google map API-KEY config.

Let me know if it helps. :pray:

Kind regards,
Morgan

Hello
Indeed I had not tried that yet, I will let you know as soon as I can test.
Thanks for the tip!

1 Like