How To Acquire a Google Maps API Key

Tutorials and 'How To' information.
Post Reply
User avatar
Dan Crosby
Site Admin
Posts: 181
Joined: Thu Apr 30, 2009 9:28 am
Company: Lincoln Agritech Ltd.
City / Town: Lincoln
Location: Lincoln, New Zealand
Contact:

How To Acquire a Google Maps API Key

Post by Dan Crosby »

Google have changed the terms of access to their Google Maps APIs. This effects the usage of Irricad's Import From Google Earth function. From 11th June 2018 access to the APIs will only be allowed if you have an API key and that key is associated with a billing account.

As of March 2025 Google has changed their pricing to a "request based" model. We believe that, under normal circumstances, an average user is unlikely to breach any of the free monthly request thresholds. However please be aware that if you have previously specified a $200 spending limit to match the free usage limits under the old pricing model, this can now potentially result in a $200 monthly bill. You may wish to review how your limits and alerts are configured. If you are concerned about the new pricing model, Google provides a pricing calculator here:
https://mapsplatform.google.com/pricing-calculator/

Please find below instructions detailing how to acquire an API key and how to enable billing and budgeting for that key.


Download the PDF from http://www.irricad.com/Irricad/Download ... APIKey.pdf.


Contents

Getting an API Key
Securing an API Key
Setting a Budget
Enable Billing For An Existing Key
Saving Your API Key


Getting an API Key

1). Visit Google Maps Cloud Platform

2). Ensure you are signed in to your Google account account, by clicking the icon at the top-right or clicking "Sign In":
01 - SelectGoogle Accounta.png
01 -SelectGoogleAccountb.png
Note that if you don't already have a Google account you will need to create one.

3). Click the "Get Started" button on the right-hand side.

4). You will then be redirected to the Google Cloud Console page, and prompted to enable billing. Note that in providing your credit card details you are automatically eligible for a $200 per month credit and below we help you to set a budget to not exceed this value. If the budget is not exceeded then use of Google's elevations will be free-of-charge. Keeping an API key in-house or only shared between a few people should mean that you will not exceed this, however see further below for the instructions on setting a budget.

Click “Create Billing Account” and set up your billing profile, including your name, address and credit card details:
GE-createBilling.png
Then click “Start My Free Trial”.

5). An API key will now be generated for you. Make sure that the two options are enabled, for streamlining this process.
API Key.png
Save this API Key either in to the field provided when you action Import from Google Earth:-
GE-Field.png
Or into your IrricadGeImport.ini file where it asks for the “GMApiKey”.
GE-ini file.png
GE-ini paste.png
It is a good idea to keep a backup of your API key. One way to do this is to copy the modified ini file into another place, such as the parent Irricad folder for example.

Securing an API Key

6.) Now go back to the Google Cloud. Note that the “Enable all Google Maps APIs for this project” and “Create budget alerts” options are enabled for automatic setup.
API Key.png
Click on the “Go to Google Maps Platform” button.
A message will pop up to protect the key
GE-Protect.png


If a message does not pop up go to "Credentials" and click on your named API key (in this example called "Maps API Key" and is a blue underlined link).

Select “API Restriction” and select the 4 required APIs. These are:-
- Maps Elevation API
- Maps Javascript API
- Maps Static API
- Places API
GE-ProtectPick.png

Click OK and then click “Restrict Key”
GE-Protect4.png

7). Now click on Credentials on the left-hand-side menu. You should see a green check-mark against your API key.
GE-Credentials.png

8). Now Import From Google Earth is ready to use.

If you have an existing key then follow the steps below to secure it, add billing information, or set a budget.



Setting a Budget
You may wish to limit the amount of money that can be automatically billed against your API key, and to set e-mail reminders when you are approaching that limit.

1). From the Google Cloud Console homepage, select “Billing” from the menu:
GEBudget.png

2). Then select “Budgets & alerts”:
GEBudgeta.png

3). Create a budget that fits your requirements. Below the budget amount has been set to Google’s $200 ‘free’ monthly usage allowance:
GEBudget1.png
GEBudget2.png
GEBudget3.png
GEBudget4.png


Enable Billing For An Existing Key

1). Ensuring you are logged in to the correct Google Account, visit Google Maps Cloud Platform

2). From the Google Cloud Console homepage (click the "Console" link next to your login icon), select “Billing” from the menu:
GEBudget.png

3). Link a billing account:
GE Enable Billing.png

4). You will then be prompted to enable billing, as above:
GE Enable Billing2.png

Saving Your API Key

Once you have acquired your key, you must enter it into the Irricad Google Earth Import utility.
On starting the tool you will see the following prompt in Version 18 or later:
GE-Field.png
Enter your key and click OK to enable the tool.

The key is saved in the "IrricadGEImport.ini" file for the tool. You can enter the key directly in the file, which can be found in your Irricad installation folder, typically somewhere like "C:\Program Files (x86)\Irricad\Irricad Pro XX\IrricadGEImport.ini". Open the file in Notepad and find the GMApiKey entry under the [Options] section. Enter your key after the = sign and save the file - e.g.,
GE-ini paste.png
The IRRICAD Team
You do not have the required permissions to view the files attached to this post.

Dan Crosby
Irricad Developer
Lincoln Agritech Ltd
Post Reply