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 signing 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:
- Go to the Google Cloud Platform Console.
- Click on the project drop-down and select or create the project for which you want to add an API key.
- Click on 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. - 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:
- Go to the API Console.
- From the projects list, select a project or create a new one.
- 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.
- 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
- Click ENABLE
Add API key in your OctopusPro settings
- In your OctopusPro account, go to Settings > Company Settings > Integration (API)
- Click on New Developer Integrations (API)
- Select Google Maps API, and fill your key in Maps API key (web)
- 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.