Integrate Google Maps API

Google Maps API Integration

​The Google Maps API generates maps and returns useful mapping data for all places and locations related to your bookings including data required for mapping your fieldworker routes, calculating arrival times about a latitude/longitude location, or return relevant data for a particular address.

Certain OctopusPro plans require you to create your own Google Maps API account for integration with OctopusPro. Google Maps requires a special Google Maps API key. Without this key, you cannot display Google Maps within your account or calculate distance between your customer bookings and your fieldworkers. 

Billing and pricing

Google Maps Platform offers a free monthly credit for Maps, Routes, and Places. With the monthly credit, the vast majority of customers find their use cases are completely free. You get a recurring monthly credit on your billing account each month to offset your usage costs, and you can also set usage limits to protect against unexpected cost increases. You won’t be charged until your usage exceeds the free monthly credit. Note that the Maps Embed API, Maps SDK for Android, and Maps SDK for iOS currently have no usage limits and are free (usage of the API or SDKs is not applied against your free monthly credit).

For a table of Google’s pricing, see Pricing for Maps, Routes, and Places.

How to generate and set a Google Maps API key

The Google Maps JavaScript API browser key is used to display maps on your website. Without this key, you’ll see the following error:

Oops! Something went wrong.
This page didn’t load Google Maps correctly. See the JavaScript console for technical details.

To get started, you need to first ensure that you have a Google account. If you don’t, start by singing up for a Google account, if you already have a Google account, sign into your account and go to 

Generate a new API key

You must have at least one API key associated with your project. Before you can set this API key in your OctopusPro account, you’ll need to generate it. The steps below will show you how to do that.

To get an API key:

  1. Go to the Google Cloud Platform Console.
  2. Click on the project drop-down and select or create the project for which you want to add an API key.
  3. Click on the menu button and select APIs & Services > Credentials.

  4. On the Credentials page, click Create credentials > API key.
    The API key created dialog displays your newly created API key.
  5. Copy your API key and click Close.

The new API key is listed on the Credentials page under API keys.

From Your Google Account: Enable API

To enable the API for your OctopusPro account:

  1. Go to the API Console.
  2. From the projects list, select a project or create a new one.
  3. If the APIs & services page isn’t already open, open the console from the left side menu and select APIs & services, and then select Library.
  4. Click on the API you want to enable. If you need help finding the API, use the search field. Here the list of APIs you should enable
    • Maps JavaScript API
    • Distance Matrix API
    • Geocoding API
    • Geolocation API
    • Maps Static API
    • Maps SDK for Android
    • Directions API
    • Places API

  5. Click ENABLE

Add API key in your OctopusPro settings

  1. In your OctopusPro account, go to Settings > Company Settings > Integration (API)
  2. Click on New Developer Integrations (API)
  3. Select Google Maps API, and fill your key in Maps API key (web)
  4. Finally you can use the same key for both web and mobile, or you can repeat the same steps and get a different key for mobile

How to secure a Google Maps API key

To prevent quota theft, secure your API key following these best practices. There are two types of restrictions: application restrictions and API restrictions. In this article, we’ll explore both of these restrictions.

Scroll to top