Introduction
- Generate Google Map key for android - step by step. These are the steps I am following to generate my map key for android. You are using the Google Map API V2.
- Apr 10, 2020 To get an API key: Go to the Google Cloud Platform Console. Click the project drop-down and select or create the project for which you want to add an API key. Click the menu button and select APIs & Services Credentials. On the Credentials page, click Create credentials API key. The API key created dialog displays your newly created API key.
Click on the Create button and copy your API key Go back to the Dashboard and select Maps Static API from the list Move to the “ URL Signing Secret ” tab Click on the “ Allow unsigned usage ” button and confirm it by clicking the “ Allow unsigned usage ” on the popup window.
Google has announced that they have changed their policy in regards to accessing and using their Maps API without an access key. Starting June 22, 2016 all new domains using the Maps API must register an account with Google and register their site for access to use the Maps API. So if you are receiving this error message instead of a map you must create an account with Google and setup access keys for your site. Google does provide documentation on how to get a key but they are pretty sparse, lacking on detail. This FAQ will provide more detailed step by step instructions.
Step 1 – Create Your Account
You must have a Google account or Gmail account. If you do not have one, you can create a Google account without a Gmail account here.
If you have a Gmail account, then you already have a Google account. To login to the Google API Console you will use your Gmail login email and password.
Login to the Google API Console.
Step 2 – Create Your Project
Navigate to the Google Maps Platform.
Get Started
Click the “Get Started” button.
Enable the Google Maps Platform
Enable the “Maps”, “Routes” and “Places” options and click the “Continue” button.
Create or Select an Existing Project
Enter project name in the box and then click the “Next” button.
Step 3 – Create Billing Account
Fill in your contact and payment information and click the “Next” button.
Step 4 – Get the API Key
In the next window titled “Enable Google Maps Platform”, click the “Next” button. You will be presented with your API key. Clock the “Copy” icon and then click the “Done” link.
Step 5 – Add the API Key to the Setting
Navigate to the Connections : Settings admin page, click the Advanced tab and scroll down to the Google Maps Geocoding API section. Paste the key you copied in the Browser API Key field and save.
Step 6 – Secure the API Key
It is highly recommended to add a HTTP Referrer restriction to prevent unauthorized usage of your API key. To do this follow these steps:
- Navigate to Google Cloud Platform Console and click on your key.
- Select “HTTP referrers (websites)” and enter your site domain name in the field.
- Click the “Save” button.
I recommend using
http://domain-name.com/*
as the referrer; change domain-name.com
to your website address. The preceding http://
and trailing /*
are important and should not be left off otherwise your Browser Key may not work because it will not be able to validate the referrer. You can now click the “Create” button.Tip
The most common error is setting up the referer restriction incorrectly. If you encounter problems it is recommend to remove all restrictions and see if that helps, and then add your restriction back in. Chances are that if it works without the referer restriction and does not with restriction, the referrer you are using is incorrect.
Tip
Open the directory page in Chrome, hit the F12 key and then click the Console tab. Google displays the Maps API errors in the Console with links to their documentation on how to correct the error that is occurring.
Step 7 – Create a Server API Key
Google Map Api
Create a second API key in the same project, but this time do not add a restriction to it. After you are finished creating the key. Add it as the Server API Key on the Connections Settings admin page.
This article covers creating a Google Maps API key inWP Google Maps.
Option 1: Using our Cloud API Key
For: Standard Users
Navigate over to our Cloud API Key purchase page and get an API key with the click of a button.
Option 2: Creating a Google Maps API Key
For: Technical Users
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.
Select a Project
If this is your first time creating an API key, you will have to create a Project first.
- 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
Select your country and accept Terms of Service. Click Continue.
Steps To Generate Google Map Api Keyboard
Enter your customer info (details) and card information.
Select START MY FREE TRIAL.
![Steps To Generate Google Map Api Key Steps To Generate Google Map Api Key](/uploads/1/2/6/0/126046473/698802836.jpg)
Please note that you a 12-month or $300 credit free trial. When this free trial ends, 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.
For more information about the free trial, please refer to Google’s documentation.
Once your billing has been set up, you can move onto creating your API Key.
Generate Your API Key
You will now receive your API Key
- Copy the API key to your clipboard.
- Return to your WordPress site and paste the API Key into the box labeled “Google Maps API Key” at the top of the page at WordPress Dashboard → Maps→ Settings→ Advanced.
- Click the Save Settings button.
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 API Console link on the Enable Google Maps Platformwindow as shown above.
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.
Please note that the Google Maps API is very specific about how this field is formatted – please use exactly this format.
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.
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.
The following is a quick list of all the APIs that need to be enabled along with your JavaScript API:
- Google Maps JavaScript API
- Google Maps Geocoding API
- Google Places API
- Google Maps Directions 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.
This article covered creating a Google Maps API key inWP Google Maps. If you need further assistance or are having other issues with the plugins, feel free to visit our Support Desk.
Was this article helpful to you?