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. 

  1. To begin, you need to access your Google Developer console
  2. 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.
  3. 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.
  4. Click on the Browser key button to create the new browser API key.
  5. 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.
  6. You now should see the new API key on the screen. Copy it and enter it in the Gravity Geolocation Settings page.
  7. 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.
  8. Click on the Google Maps Geocoding API to navigate to the API service page ( note that you will need to repeat steps 8 and 9 same way for the Google Places API Web Service and Google Maps JavaScript API links ).
  9. Click Enable at the top of the page to enable the API service. Then, go back to step 8 and do the same in order to enable the Google Places API Web Services and Google Maps JavaScript API as well.

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.