Skip Navigation

[Resolved] Google Maps API general settings : javascript API error

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here was that the user was having an issue with the API key validation for Google Maps.

Solution:

It seems that you are using a restricted API key that is limited to a particular site.

Could you try generating a key without a restricted domain and try this key. This is just to ensure that the Maps API will validate.

This support ticket is created 5 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 2 voices.

Last updated by Benoît 5 years, 1 month ago.

Assisted by: Shane.

Author
Posts
#1212632
Screenshot 2019-03-11 15.16.24.png

I am trying to:
To setup Google Maps API in the toolset general settings

Link to a page where the issue can be seen: see screenshot

I expected to see:
I've entered and validated the Google Map API key. It is OK.

Instead, I got:
But an error occured for the Map styles (see screenshot)

#1212643

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Benoit,

Thank you for contacting our support forum.

It seems that you are using a restricted API key that is limited to a particular site.

Could you try generating a key without a restricted domain and try this key. This is just to ensure that the Maps API will validate.

Thanks,
Shane

#1212705

Hi Shane,
Thanks. I did it and it fixed the bug.

However, Google seems to insist to add restrictions for security reason.
Is there a way to secure my key without the Google restrictions?

Thanks

#1212770

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Benoit,

You can restrict it.

Could you send me a screenshot of the restricted referrer screen?

It could be that the way you enter the site url is causing it not to validate.

Thanks,
Shane

#1212989

My issue is resolved now. Thank you!

Hi Shane, I was able to add a restriction and now it works.

Thanks for your help.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.