-
-
Hi!
All of a sudden I got this message on my contact page :
Oops! Something went wrong.
This page didn’t load Google Maps correctly. See the JavaScript console for technical details.I created an API key following Google’s instructions. I’ve enabled billing. I’ve entered my new key. But the message remains
On one site I found this information:
Locate the file that contains the Google Maps script code on your website, and append your API key to it as a parameter:
<pre class=”brush: jscript; title: ; notranslate” title=””><script src=”//maps.googleapis.com/maps/api/js?key=YOUR_API_KEY” async=”” defer=”defer” type=”text/javascript”></script>If there aren’t other parameters, just add ?key=YOUR_API_KEY at the very end of the src path; otherwise, add &key=YOUR_API_KEY instead, like this:
<pre class=”brush: jscript; title: ; notranslate” title=””><script src=”//maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&key=YOUR_API_KEY” async=”” defer=”defer” type=”text/javascript”></script>Could you please tell me where to locate this file so that I can write the new script?
Also, it would be great to update the theme so that it includes this new line of script.
Thanks!
- This topic was modified 6 years ago by slauvergeat.
-
Hello,
You don’t need to edit the code. You have to edit the website with Customizer and after that you to select on the Google Map element. In the left sidebar will see the field to add your API key.
Let us know if you will experience any issue.
Best Regards!
-
Hi Ruco!
Thanks for your quick reply.
That’s what I did, but I still get the same message…..
Any other idea?
-
Hello,
If you want to make a customization to the original code you have to edit the file includes\codeless_builder\shortcodes\cl_map.php.
Anyway if you want, let us know when you want to add the google map and give to us your api key so we will try to configure it for you.
Let us know.
Regards!
-
Well…. that would be really nice of you!
I’m going to send you the API key in a private message.
THANK YOU!!!
-
-
Hello,
This is the error that google api generate. You have to make the url allowed and able to access the map. Check the google documentation of this problem:
https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-errorSee Google Cloud Platform Console.
RefererNotAllowedMapError Error
The current URL loading the Maps JavaScript API has not been added to the list of allowed referrers. Please check the referrer settings of your API key on the Google Cloud Platform Console.See API keys in the Google Cloud Platform Console. For more information, see Using API Keys.
Let us know.
Regards!
-
OK. Now I understand the problem.
I had previously set as an HTTP referrer the following URL:
https://www.les-creatures.com/
Now, I’ve changed it to:
https://www.les-creatures.com/contact/
(where the map is located)
But it still does not work….
- This reply was modified 6 years ago by slauvergeat.
-
Hello,
This is the error that google map gives:
?v=2.0:6 WebSocket connection to 'wss://public-api.wordpress.com/pinghub/wpcom/me/newest-note-data' failed: Error during WebSocket handshake: Unexpected response code: 403 v @ ?v=2.0:6 js?key=AIzaSyDZCwrOJUbBL3ReHx5fXSTT2yLRCzhBhPE&ver=4.9.8:51 Google Maps JavaScript API error: RefererNotAllowedMapError https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error Your site URL to be authorized: https://www.les-creatures.com/contact/ _.Hc @ js?key=AIzaSyDZCwrOJUbBL3ReHx5fXSTT2yLRCzhBhPE&ver=4.9.8:51 ?v=2.0:6 WebSocket connection to 'wss://public-api.wordpress.com/pinghub/wpcom/me/newest-note-data' failed: Error during WebSocket handshake: Unexpected response code: 403 v @ ?v=2.0:6 ?v=2.0:6 WebSocket connection to 'wss://public-api.wordpress.com/pinghub/wpcom/me/newest-note-data' failed: Error during WebSocket handshake: Unexpected response code: 403
I think you have to check the google api.
Regards!
-
You must be logged in to reply to this topic.