Description:
Maps Not Displaying After Deploying the Solution Despite Generating a New Google API Key: Troubleshooting Guide
Works with Evolve ; 11x;12x
Solution:
Possible Cause: Incorrect Authorization Settings for the Generated Google API Key
The reason behind the maps not displaying even after generating a new Google API key could be due to incorrect authorization settings during the key generation process. This applies to both Foundation and Evolve products.
To resolve this issue, the following authorizations or capabilities should be enabled for the Google API:
a) Places API b) Geocoding API c) Maps JavaScript API
To make these changes, follow the steps below:
- Go to https://console.cloud.google.com/ and search for the mentioned APIs. If they are disabled, enable them.
- Ensure that the API keys are not restricted.
- Visit the Google Maps Platform > Credentials page.
- Select the API key for which you want to set restrictions. This will display the API key property page.
- Under Key restrictions, set the following restrictions:
- Application restrictions: Choose “HTTP referrers (web sites)” and specify the referrer websites. For example, “*.google.com” accepts all sites ending in google.com.
- API restrictions: Click “Restrict key” and select “Maps Embed API” from the dropdown. If the Maps Embed API is not listed, enable it.
- Save the changes to finalize the settings.
If, even after following these steps, the issue persists and an error is encountered, ensure that the Google API key has been purchased. Sometimes, when the trial period is over, it can lead to errors in API functionality.