Oops! Something went wrong. This page didn’t load Google Maps correctly. See the JavaScript console for technical details.


My page suddenly started showing grey window and the error instead of the map which was working fine before:

google map developer api key

As of June 22, 2016 Google is making the following changes to the Google Maps APIs Standard Plan:
http://googlegeodevelopers.blogspot.com.au/2016/06/building-for-scale-updates-to-google.html

Using the Google Maps API on localhost or your domain after June 22nd, 2016, will require an API developer key to get rid of this error.
Please see the Google Maps APIs documentation to register for the Google Api key and mention it in your code.

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

To append the API key

To specify a key, include it as the value of a key parameter when loading the API.

If there aren’t other parameters, just add ?key=YOUR_API_KEY at the very end of the src path

<script async defer
      src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap">
</script>

If your src path already has some appended parameters, for example:

<script src="http://maps.google.com/maps/api/js?sensor=false"></script>

just add &key=YOUR_API_KEY at the very end to the src path:

<script src="http://maps.google.com/maps/api/js?sensor=false&key=YOUR_API_KEY"></script>

Leave a Reply

Your email address will not be published. Required fields are marked *