Create Google Map API Key
*Note, this tutorial in some steps refers to the Gravity Geolocation plugin. However, the creation of the API key is the same for other geolocation plugins as well. Make sure to enter the Google API key in the settings page of your plugin.
In order to use the Google Maps features on your site, Google requires an API key to be registered on your site. Google provides different API keys and different API services. The steps below will show you how to create the proper Google Maps API key and how to enable the API services which are required for the Gravity Geolocation plugin.
- To begin, you need to access your Google Developer console.
- When first navigating to the console page you MIGHT get the page below. If you do, choose Create a project from the drop down menu, then click Continue.
- Click on Credentials tab on the left column to navigate to the Credentials page. When in the Credentials page click on Create credentials then click on API key to create a new API key.
- Click on the Browser key button to create the new browser API key.
- When In the API key page, in the Name input box enter any name that you would like to use for the API key. For example Gravity Geolocation. Then, in the URL input box below, enter the URL of the site which you are going to use with the API key. For example gravitygeolocation.com/*. When done, click on the Create button.
- You now should see the new API key on the screen. Copy it and enter it in the Gravity Geolocation Settings page.
- Now you need to enable the required API services. To do so, click on the library tab in the left column. You will then be taken to a page with the list of API services offered by Google. Under the Google Maps APIs list, click the more link to see the rest of the Google Maps API services.
Thats it! Your new API key should now be enabled and ready to be used. If you haven't done so already, you will need to enter your new API key in the Settings page of Gravity Geolocation plugin.