Blog | Steps to Generate Your Google API Key

Updated on September 8, 2023

Note: A critical software update for the Google Earth was released with the Fall 2022 Software Update for VC4, VC5, and VC for Public Safety. You must either update or do a new install to continue using this feature.

As of June 11, 2018, Google implemented new pricing guidelines for their various services related to Google Earth. Users of Virtual CRASH 4 prior to May 2018 likely received an email from Google with subject “[Action Required] Changes to your Google Maps APIs account” where these changes were announced. Users must now create a billing account with an associated credit card number to use Google API services. While Virtual CRASH 4 users are unlikely to accrue any charges from Google, as it would require creating a very large number of 150x150 Google terrain elevation maps per month (see: https://cloud.google.com/maps-platform/user-guide/pricing-changes/), users must still associate a credit card number with their Google Cloud Platform account to continue using the Google Earth API services. This blog post reviews the steps involved to create a Google API key. The interface depicted below is as of September 2023

It is important to carefully follow the steps exactly as shown below. Note, Google’s API & services interface may change from time to time, but the process of enabling the required APIs should look approximately the same as depicted below.

You can access the Google Earth feature by going to Create > Google > Google Maps.

Next, you should see the “Google Settings” pop up box appear.

If you do not see the “Google Settings” pop up box, you can access it by pressing the Google icon button in the upper right corner of the Google Earth window. Note, if you see a Google Earth image displayed with the words “For development purposes only”, this is an indication that your API key is not working or needs to be input into the API key field of the “Google Settings” pop up box. Again, you can access the “Google Settings” pop up box by pressing the Google icon in the upper right corner.

If you already have an API key, enter it into the “API key” field and press “OK”. If you do not have an API key, go to https://console.cloud.google.com/

This link will take you to the Google Cloud Platform login screen. You can simply login using your existing Google account, or make a new Google account specifically for this purpose if you wish. 

Sign in to your Google account. If you don’t already have a Google account, you will need to create one. Agree to the terms of service.

Press agree and continue.

Left-click on the “Select a project” dropdown menu button.

Left-click on “New Project”.

Name your project. If you have an organization associated with your Google account, you can also associate the project with your organization; otherwise, leave this as “No organization”. Left-click on “Create”. 

Now click on “Enable APIs and Services”.

Search “Maps JavaScript API” and left-click on “Maps JavaScript API” when it displays below the search bar.

Now click on “Enable”.

Next, agree to the terms of service, and press “continue”.

At this step you will be required to associate a credit card with your account (it is very unlikely to ever be charged).

After you enter your credit card information, you may need to answer some survey questions. Answer however you wish. Next press “Go to Google Maps Platform”.

If prompted to “Protect your API key”, press “Maybe Later”.

Next, from the project selection dropdown menu, ensure your project is selected. Earlier, we had named our project “My Project.” You may be prompted to associated your billing account with this project.

In the search field, type “Maps Elevation API”, and left-click on “Maps Elevation API” below.

Next press “Enable”.

If prompted to do so, select your billing account.

Critical: Now, repeat these steps, ensuring that “Maps Static API” and “Geocoding API” are all also enabled.

Now, when you left-click on “APIs & Services” in the left column, you should see all four APIs appear in the list of APIs: (1) Maps JavaScript API, (2) Maps Static API, (3) Maps Elevation API, and (4) Geocoding API.

This dashboard is essentially the homepage for all of your API services. For example, you can monitor the number of times you request map data from Google. You can also use the dashboard to verify that the required APIs have been enabled. You may see by default, you have API services already populating the dashboard. Don’t be concerned with these.

Again, setting up the API key requires you to enable:

(1) Maps JavaScript API,

(2) Maps Static API,

(3) Maps Elevation API,

(4) Geocoding API

Failing to enable one of these will likely result in a JavaScript error reported in the Google Earth import tool. If you see an error, carefully repeat the steps shown above.

Obtaining the API Key

With the four API keys listed above enabled, next, left-click on “Keys & Credentials” in the left column. Next, left-click on “+ Create Credentials”, then select “API key” from the dropdown.

Copy the API key by left-clicking on the “Copy” button. 

Paste the Key into the Google Settings window and press “OK”.