Sign up to Our

NEWSLETTER


 
To answer your question faster, you can search our knowledgebase articles before submitting a ticket.
Knowledgebase
How to get a Google Map API key?
Posted by Edward T. on 23 May 2018 11:25 AM

Since June 2016, Using Google Maps (on public websites) requires an API key.

Here we explain how to get one and set it in the right place at the WPL.


Getting Started

Navigate to the Google Maps Platform and click on the Get Started button in the top right corner of the site.

 

Enable Google Maps Platform

Select the Maps, Routes and Places check boxes and press continue.

 

Google APi

Select a Project

If this is your first time creating an API key, you will have to create a Project first.

 googl2


  • Give your Project a name. 
  • Click the next button at the bottom-right of the window.

Set up your billing

Wait for the billing prompt and select Create Billing Account

google3

Enter a name for you Billing Account, as well as your Organization name.

google4
Select your country and click Continue.
google5

Enter your customer info (details) and card information.
google6

google7

Select Submit and enable billing.

Please note that you will get up to 28 000 map requests per month and 40 000 direction calls per month, free of charge. You will only be billed when your usage exceeds your monthly $200 credit limit.

Once your billing has been set up, you can move onto creating your API Key.

Create API Credentials

Click on the Credentials option on the API Manager menu in the right sidebar.

Google8

Click on the Create Credentials button on the Credentials window
Google9


Generate Your API Key

Click on API Key on the next pop-up window.

Google10


  • Copy the generated API key to your clipboard.
  • Return to your WordPress site and paste the API Key into the box labeled “Paste your API key here and save” at the top of the page at WordPress Dashboard → Maps.
  • Click the Save button.

google11


After pasting the API Key to your WordPress site and saving the settings, return to the Google API Manager. You will want to restrict access to your API Key to avoid having it “hijacked” and going over your quota. Click the Restrict key button on the API key created window as shown above.

google12


Select HTTP referrers (web sites) and enter the following domains under Accept requests from these HTTP referrers (web sites) replacing yourdomain.com with your domain name:

 *.domain.com/*




and

*domain.com/*

google13

Click the Save button to save your Key Restrictions.

 Enable Required API Functions

Now you need to enable the required API functions for your project. Click the Library link in the API Manager sidebar menu. Click on the Google Maps JavaScript API panel.
Google14

The JavaScript API will probably already be enabled as shown in the screenshot below. If the JavaScript API is not enabled, then click Enable on the Google Maps Javascript API window.

google15

Sometimes Google does not activate all the required APIs and you will have to manually enable these APIs as described above for the JavaScript API. The following is a quick list of all the APIs that need to be enabled along with your JavaScript API:

 

    • Google Street View Image API
    • Google Places API Web Service
    • Google Maps Geocoding API
    • Google Maps Directions API
    • Google Maps Distance Matrix API
    • Google Maps Geolocation API

API Changes Introduced By Google

 

Recently, Google Maps have announced certain API changes that will affect everyone using Google Maps. Essentially, Google has implemented new pay-as-you-go pricing plans for their API. On this plan mention, users will get up to 28 000 map requests per month and 40 000 direction calls per month, free of charge.

 

Other rates and limits found here.

 The only thing required from existing users, is to add a credit card to their Google Console account if they haven’t done so already. Unfortunately, the changes introduces are completely out of our control. However, WP Google Maps will be implementing an Open Street Maps integration for the users that would like an alternative solution to Google Maps.

 For more information and questions on this topic, please refer to the FAQ for the new Google Maps API changes.

 


Comments (2)
Andrei Ploshkin
16 August 2016 12:49 PM
What for I have to set Google API key? The settings is empty now and Google Map seems to be working.
Melanie M.
20 November 2016 04:29 AM
From June 22nd, 2016 Google won't provide service for keyless requests, so you should set a Google API key into WPL- > Settings -> Global -> Google API key.
Please check following article for further information:
http://googlegeodevelopers.blogspot.co.uk/2016/06/building-for-scale-updates-to-google.html