Google Maps API Key

Updated June 2018

The following guide is an updated version of how to obtain an API Key to enable Google Maps on your Gateway.

If you already have a Google Maps API Key you’ll want to go to Step 7 - Enable Billing

Step 1: Login to Google Cloud Platform

Click here to login to the Google Cloud Platform

If you don’t already have a Google account, click here and follow the steps to create one

Step 2: Create a New Project

A project is needed to enable the APIs so you can click on the Create Project button to do so, this page is in the dashboard of your account.


Step 3: Name the Project

You can name it whatever you like, afterwards click Create

Step 4: Enable APIs & Services

Click on the ENABLE APIS AND SERVICES button

Step 4: Search for APIs from the API Library

We’re going to enable 3 APIs, the steps are detailed in the next 3 pages below.


API 1 of 3

Type “Javascript” and click on the Maps JavaScript API

Click on the blue ENABLE button

Wait for the API to be enabled...

Go back to the API Library

API 2 of 3

Type “Geocoding” and click on the Geocoding API

Click on the blue ENABLE button

Wait for the API to be enabled...

Go back to the API Library

API 3 of 3

Type “Static” and click on the Maps Static API

Click on the blue ENABLE button

Wait for the API to be enabled...

Go to the Credentials Menu

Step 5: Create Credentials for API Key use

From the credentials section click on the Create credentials button, and click on API key

 

This creates an API Key, this is the one that we will copy into Pegasus Gateway, but first we have to restrict it.


Step 6: Restrict the API Key

Click on the HTTP referrers to restrict the use of this API Key.

  1. Google Maps on your Pegasus site

If the URL for your Gateway is a subdomain (including www), for example gps.mymainsite.com

Create a new HTTP referrer with -

https://*.mymainsite.com/*

If the URL for your gateway has no subdomain, for example mymainsite.com

Create a new HTTP referrer with -

https://mymainsite.com/*

  1. Google Maps on any Beta Version

Optional

Create a new HTTP referrer with -

https://*.pegasusgateway.com/*

This allows you to try beta versions of the gateway.

  1. Google Maps on Syrus Mobile app

Create a new HTTP referrer with -  

__file_url__/*

This enables the Google Maps on your Syrus Mobile application

  1. Google Maps for Developers

Optional

Create a new HTTP referrer with -  

localhost:8080

This enables the maps for developer access

Once you’re done this is what you should be left with.

Click on the Save button

Step 7: Enable Billing

To enable billing, navigate to the billing page.

If you already have a billing account for Google Cloud Platform click on the blue “Link a billing account

if not click on the “Manage billing accounts”

Click Add billing account


Click to read the Terms of Service Google Cloud Platform Free Trial Terms of Service.

Then click Agree and continue

Fill out the Customer info and place the credit card information.

Then click Start my free trial

Step 8: Go back to the Credentials page

From the Menu, click on APIs & Services -> Credentials


Step 9: Copy the Key to Pegasus

Click on the Copy button, or highlight the key and right click to copy it.

Step 10: Paste the key into your Gateway settings

Go into the Gateway Menu under Gateway Management -> Settings

And paste your Google Maps API Key in the text box. Hit Save on the top right of the card.

Go back to Tracking, and check that it’s enabled.

You’re done!