Configure Google Maps and Geolocate - abcsoftware/abc-docs GitHub Wiki

Get an API Key from Google

  1. Create a Google Cloud Console account for the company
  2. Create a "Project" for the ABC Instance.
  3. Visit https://console.cloud.google.com/projectselector2/google/maps-apis/credentials.
  4. Click "Create Credentials" at the top middle of the screen and select "API Key"
  5. Copy the new key that is generated and paste it into the "Google Address Lookup" and the "Google Maps" integrations configuration in the ABC Company Configuration.

The address geolocation and Maps should now be functional.

Restricting API Key

It is recommended to restrict what functionalities are enabled on the API key, especially if billing is enabled.

  1. Visit the "Credentials" section of Google Cloud Console (https://console.cloud.google.com/apis/credentials) and select the project.
  2. Click on the relevant key used in ABC.
  3. Under "API Restrictions" select only "Geocoding API" and "Maps Javascript API". All other items can be de-selected.

Solving Errors

If maps quits working, look in the browser developer tools console for any errors. Below are a couple that we've encountered:

Google Maps JavaScript API error: BillingNotEnabledMapError

This indicates that you have exceeded your free usage of the Google APIs and need to add billing. Billing can be set up in the Google Cloud Console linked above.