Codeless
  • Support Home
  • Themes
  • Support
  • WordPress Tutorials
    • How to Start a Blog
    • Best Website Builders
    • Best Small Business Hosting
    • Email Marketing Services
    • Cheap WordPress Hosting
  • Video Tutorials

Community Forums

Google Maps not loading

apiGoogle Map
    • 6 years, 8 months ago slauvergeat
      Participant

      Expired

      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, 8 months ago by slauvergeat.
    • 6 years, 8 months ago Ruco
      Keymaster

      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!

    • 6 years, 8 months ago slauvergeat
      Participant

      Expired

      Hi Ruco!

      Thanks for your quick reply.

      That’s what I did, but I still get the same message…..

      Any other idea?

    • 6 years, 8 months ago Ruco
      Keymaster

      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!

    • 6 years, 8 months ago slauvergeat
      Participant

      Expired

      Well…. that would be really nice of you!

      I’m going to send you the API key in a private message.

      THANK YOU!!!

    • 6 years, 8 months ago slauvergeat
      Participant

      Expired

      This reply has been marked as private.
    • 6 years, 8 months ago Ruco
      Keymaster

      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-error

      See 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!

    • 6 years, 8 months ago slauvergeat
      Participant

      Expired

      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, 8 months ago by slauvergeat.
    • 6 years, 7 months ago Ruco
      Keymaster

      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!

Viewing 8 reply threads

You must be logged in to reply to this topic.

Login

Log In
Register

Renew Support

  • Renew Specular Support
  • Renew Tower Support
  • Renew Folie Support
  • Renew Handel Support
  • Renew June Support
  • Renew Picante Support
  • Renew Thype Support
  • Renew Regn Support

Search Forums

Forums

  • Bygge – Construction Theme
  • Converta – Software Theme
  • Folie – The WordPress Website Builder
  • Handel – Responsive Multi-Purpose Business Theme
  • June WooCommerce WordPress Theme
  • Livecast – Podcast Theme
  • Picante – Restaurant & Food WordPress Theme
  • Regn | Agency & Business WordPress Theme
  • Remake – Minimal Portfolio & Agency Theme
  • Specular – Multi-Purpose WordPress Theme
  • Suggest us Features
  • Tower – Business-Driven Multipurpose WP Theme
  • Vibrance – Photography Theme

Site Links

  • Support Policy
  • Specular Support Forum
  • Video Tutorials
  • Knowledge Base
  • Guides and Reviews

Useful Articles

  • Build a Website
  • Web Design & Development
  • Hosting
  • WordPress

Login

Log In
Register Lost Password