Google API keys

Web maps.

Google Maps recently changed their policy regarding API keys. Until June 2016 sites with a relatively low amount of traffic did not require an API key for the Google Maps Javascript API to work. That is no longer the case.

Google Maps does have usage restrictions which you can read about elsewhere, but for public facing websites with less than 25,000 map loads a day the Google Maps API continues to be free.

If you find that a Google Map on your website no longer works there is a good chance that this is why. The fix is pretty easy. I have written this article to walk you through.

So how can I fix it?

First of all you will need to create a Google API key here. The API key will be associated with your Google account, so it is a good idea to use the Google/Gmail account associated with the business or business owner of the website you are working on.

Create a project for your website. It is a good idea to restrict your key to HTTP referrers that you will be using the key on. In my case I use ** . This will protect you on the off-chance that someone else tries to use your key on their site.

If you are using a WordPress plugin to display your map the error you see may include instructions, generally requiring you to paste your new key into the plugin or template settings somewhere. Otherwise you will need to paste your api key into the code when you call the API.

All this is documented in far more detail by Google. I hope this helped you through your hick-up.

This entry was posted in Web maps on by .

About David McCarthy

David is a web developer, and a map designer. He has been working in the web development and cartographic fields in a variety of positions, including design, development and management. He has excellent interpersonal and team leadership skills proven through systems analysis, project management and customer relations. David focuses on the front-end aspects of web development. Responsive design and mapping applications are at the top of the list. He enjoys exploring new technologies, and building upon his mapping, web design and programming skills.

Leave a Reply

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