- /
- /
- /
How to generate a Google Map API key
Google Maps is a convenient way to share your location to your customers or any purpose for that matter.
Adding a Google Map to your WordPress site is fairly easy and can be done using shortcode or widgets once you have installed plugins for displaying google maps,an alternative method can be direct injection of code if you are comfortable.
Before June 22, 2016, API key was not required for displaying a Google Map in you site or applications but as per the new rule, Google is no longer supporting keyless access that means you wont be able to display a google map in your site or application.
Here we will be using WP Google Maps plugin to display the Google Map in our site which requires an API.There are many types of API keys but we will be needing Google Maps JavaScript API key to display it in a website.
So,please follow the steps mentioned below to generate an Google Maps JavaScript API key:
- First visit this link and click on Google API Console under Get A Key section.
- Now you will be redirected to another page where if you are a visiting for the first time then you need to create a new project otherwise you can edit an existing project instead.
- Click on Continue
- You need to add credentials to your project and click API key button.
- Now give your key a name and set restrictions as per your requirement and then hit Create.
Select HTTP as you will be displaying the map in a website and you can also enter the list of your sites from where you will be requesting to display the Google Map
- Your API key is now generated and you can use it for displaying maps.
But you need to enable this key first.So to do this goto the Dashboard of the API manager, hit Enable API then select Google Maps JavaScript API under Google Maps APIs and then click Enable.
Now you have a API key enabled for displaying Google Maps in your website, add the API key in the plugin settings and use a widget or a shortcode as provided by the plugin.