Oops! Something Went Wrong. When Google Maps Doesn't Work

Written by Trifo 0 Comments
Have you ever seen the following error:

oops-something-went-wrong

It appeared all of a sudden on your web site, causing the Google Maps to stopped working?

Here is the answer!


Google recently updated their Maps API standard plan and keyless access is no longer supported.

So if  you came across that on your web site, you would need to:

  1. Get a Key
  2. Update and re-configure your application.

Here is a quick example of how your code should look like:
<!DOCTYPE html>
<html>
 
<head>
   
<style>
       
#map {
       
height: 400px;
       
width: 100%;
       
}
   
</style>
 
</head>
 
<body>
   
<h3>My Google Maps Demo</h3>
   
<div id="map"></div>
   
<script>
     
function initMap() {
       
var uluru = {lat: -25.363, lng: 131.044};
       
var map = new google.maps.Map(document.getElementById('map'), {
          zoom
: 4,
          center
: uluru
       
});
       
var marker = new google.maps.Marker({
          position
: uluru,
          map
: map
       
});
     
}
   
</script>
   
<script async defer
       
src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap">
   
</script>
 
</body>
</html>

If you are using common application, such as WordPress, Joomla, Magento, Drupal... then the chances are it's developers have already implemented the update according to Google's regulation, so you would simply need to get a key and add it to the application.

Checkout the settings section of the Google Maps plugin that I use on my WordPress:

inputapihere

After entering and saving my API key, the Map started working properly.

Hope that you have found this information useful.

As always - if you have any questions, please do not hesitate to contact us!

You might also like...

About the Author

Trifo works in customer support at Kualo. He's a ninja at working with popular open source applications like WordPress, Joomla and Drupal to name a few. Fun fact, Trifo recently became a father!