Google Maps API requires a key in order to have access to its service. There are different places where this key is needed and the most important part is to generate it the right way. There’s a simple way to do that.
In order to get generate a Google Maps API Key correctly, please follow the steps below:
1. Access the Google Maps Console
2. Choose “Create a project” and click “Continue”. On the new screen, name your project and preferred restrictions for your API key. If you don’t want to add restrictions, you can set this option to “None.”
3. On the Dashboard, click “Enable APIS and Services”
4. Then search for the following separate API services.
- Geocoding API
- Geolocation API
- Places API
For each of those click “Enable.”
5. Back on your project dashboard click the “Credentials” tab. Click “Create Credentials” and choose “API Key”.
After that, make sure you insert the Google Maps API Key into your WordPress Dashboard at Listings → Settings.
6. Enable billing on the Google Cloud Project by going here.
To learn more about this feature, read the documentation provided by Google.