Description
I have generated new Google API key but still the Maps are not showing after deploying the solution.
Applies To
Evolve ; 11x;12x
Solution/Immediate Workaround
The reason could be when the key was generated correct authorizations are not selected. This is application for both Foundation and Evolve Products.
Below authorizations or capabilities need to be in place in order to use the Google API with Maps.
a) Places API
b) Geocoding API
c) Maps Javascript API.
To Make these changes go to - https://console.cloud.google.com/- Search for above mentioned API's ; if disabled please enable and then test the scenario.
Also ensure keys are not restricted.
-
Go to the Google Maps Platform > Credentials page.
- Select the API key that you want to set a restriction on. The API key property page appears.
- Under Key restrictions, set the following restrictions:
- Application restrictions:
- To accept requests from the list of website that you supply, select HTTP referrers (web sites) from the list of Application restrictions.
- Specify one or more referrer web sites. For example,
*.google.com
accepts all sites ending ingoogle.com
, such ashttps://developers.google.com
.
Note: file:// referers need a special representation to be added to the key restriction. The "file://" part should be replaced with "__file_url__" before being added to the key restriction. For example, "file:///path/to/" should be formatted as "__file_url__//path/to/*". After enabling file:// referers, it is recommended you regularly check your usage, to make sure it matches your expectations.
- API restrictions:
- Click Restrict key.
- Select Maps Embed API from Select APIs dropdown. If the Maps Embed API is not listed, you need to enable it.
- To finalize your changes, click Save.
If a customer encounter below error after performing all the above mentioned steps; then make sure that Google API key had been bought sometimes when the trial period is over it starts showing this error.
Comments
0 comments
Please sign in to leave a comment.