Are you running a small business website and your Contact page now has an error:
Google Maps API error: MissingKeyMapError
This is easily solvable but you need to know a couple of technical details to get it up and running again. Here’s how to do it:
- Login to a Google service such as Gmail. If you don’t have a Google account yet then you will need to create one.
- Jump to https://developers.google.com/maps/documentation/javascript/get-api-key.
- Click the [GET A KEY] button at the top of the page.
The page will take a few seconds to process and then show you a screen with a complicated number on it. This is your “API Key” for your Google Map. Copy this number somewhere. - Add the following code to your website. The code needs to site in the “head” of your website.
To do this, most website themes will allow you to add script or add something to the head of the website. If you don’t know how to do this then contact your web developer. We’re happy to help if you need a hand.<script src=”//maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap” async=”” defer=”defer” type=”text/javascript”></script>IMPORTANT: Replace the YOUR_API_KEY text with the “API Key” that you copied before, e.g if your key was 5752a7d8-283a-486b-ae87-d471bfff7b04, then the code would be
<script src=”//maps.googleapis.com/maps/api/js?key=5752a7d8-283a-486b-ae87-d471bfff7b04″ async=”” defer=”defer” type=”text/javascript”></script> - Refresh your Contact page and the error will now be gone.
If the error is still showing then please get in contact with us or contact your web developer.
Why does the error occur?
Google has restricted access to its maps service. This is to stop people abusing into the free service. To restrict access, it now requires a registered key to display a Google map. The key will allow 25,000 hits per day.