Symptom
User activated the Google Maps mashup with a Custom API key, however, the maps view still doesn’t show.
Environment
SAP Cloud for Customer
Reproducing the Issue
-
Log on to the system.
- Navigate to the Customers work centre.
- Go to the Accounts view.
- Select All.
- Click Enable Map View.
Result: Google Map doesn't show
Error: "Oops! Something went wrong. This page didn't load Google Maps correctly. See the JavaScript console for technical details"
Cause
When enabling map view, Google Maps throws a Google Maps JavaScript API error: UnauthorizedURLForClientIdMapError.
The tenant is not authorized to use the custom API key.
Customers can purchase custom APIs as part of a 'Google Maps APIs Premium Plan license'. This API can only be used by a list of restricted URLs that have been specifically authorized. This authorization prevents a third party from using your client ID on their own website.
Resolution
Tenant / System URL must be authorized by customer.
To see the URLs you have already authorized or to authorize additional URLs:
- Log in to your Google Cloud Support Portal.
- In the left-hand menu, click Maps: Manage Client ID.
- Navigate to section "Registering authorized URLs".
Go through the details provided in the link below to authorize your application to use Google Maps with your Custom API key.
https://developers.google.com/maps/documentation/javascript/get-api-key#registering-authorized-urls
See Also
Keywords
custom, API key, Google Maps, authorization , KBA , AP-RC-GEN-MSH , Mashups , Problem