Google updated their Maps API requirements last year, many of our customers are just now finding their maps no longer working. I’m not sure if the policy is just going into affect for them, but the issue usually lies in the fact that the API key they are using does not have billing enabled.
Instead of a map, the page will show a gray error message from Google:
Checking the console errors, a message stating that “You must enable Billing on the Google Cloud Project”:
This error indicates that there is a Google Maps API key associated with the project, but doesn’t currently have billing enabled. Following this link should help get that solved: https://console.cloud.google.com/project/_/billing/enable, but what if you don’t have access to the account the API is associated with? This is the issue most of our customers are finding is the case, so let’s solve the whole problem by creating a new API key on an account you do have access to.
1. Create a new Google Cloud project
The first step is to create a new project. Once you’re logged into your Google account, visit the Google Cloud Platform page. If it’s your first time there may be terms you’ll need to accept, but you’ll eventually get to a blank looking page like this:
At this point, choose the Select a project dropdown and create a new project:
Give the project a name and click Create:
Once the new project is created, you’ll end up on the Google Cloud Platform dashboard.
2. Enable APIs and Services
The next step is to enable the API’s and Services you want. Find the APIs & Services link and click on the Dashboard:
Once there, click on the “Enable APIs & Services” link:
At this point the API has been enabled for your project. Yay! We’re maybe half to a quarter of the way there… Boo :(
Get API Credentials
You’ll need to get the API credentials to enter onto your site, or in a Maps WordPress plugin. Let’s go get those. From which ever page you’re at, click on the Google Cloud Platform link in the header. This will take you back to the dashboard. From there, hover over APIs and Services, and choose Credentials:
On the next page find the Create Credentials link. Hover over it and you’ll see a list of credential types. Choose the top one pertaining to APIs:
The API Key will be created, you can now copy it and keep it safe. This is the coveted key you need for your application. They will ask you to restrict the key, but I’m not fully up on what that exactly means. Restrict at your pleasure:
Now we’re finally getting to the error many of you may be encountering. Let’s get billing enabled. Go back to the Google Cloud Platform Dashboard and click on Billing. If you don’t have billing set up at all, you’ll see this:
Either of these options will allow you to create a new billing account. If you already have one elsewhere, choose the Manage option. Once you choose to set up a new account, you’ll have a few steps to follow to get set up, starting here:
Once you get through this initial setup process, including adding a credit card to the account, you can go back to the billing section and link the project to an account. Head back to the Dashboard, and click again on Billing. You’ll be prompted to either link or manage the billing accounts. Choose link account:
Once accepted you’ll be taken back to the project page and you should be good to go!
Given how often Google changes the way they do things, it’s very likely that these directions may be out of date as you read this. Hopefully these directions can at the very least guide you along the way towards getting Google Maps back running on your site. Reach out via chat if you have questions.