Configure Google Maps and Geolocate - abcsoftware/abc-docs GitHub Wiki
Get an API Key from Google
- Create a Google Cloud Console account for the company
- Create a "Project" for the ABC Instance.
- Visit https://console.cloud.google.com/projectselector2/google/maps-apis/credentials.
- Click "Create Credentials" at the top middle of the screen and select "API Key"
- 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.
- Visit the "Credentials" section of Google Cloud Console (https://console.cloud.google.com/apis/credentials) and select the project.
- Click on the relevant key used in ABC.
- 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.