- Go to the Google Cloud Platform Console:
- Visit Google Cloud Console.
- Create a New Project or Select an Existing One:
- If you don’t have a project yet, click on “Select a project” at the top of the page and then click “New Project.” Give your project a name and click “Create.”
- Enable the Maps JavaScript API:
- Navigate to the “Library” in the sidebar menu.
- Search for “Maps JavaScript API” and click on it.
- Click the “Enable” button.
- Generate an API Key:
- In the sidebar menu, go to “Credentials.”
- Click on “Create credentials” and select “API key.”
- An API key will be generated. You can restrict the key by clicking “Restrict key” to specify which websites or IP addresses can use it.
- Add the API Key to Your Project:
- Copy the generated API key.
- Go to your project’s settings where the Google Map integration is configured.
- Paste the API key in the designated field for the Google Map API key.
- Save Changes:
- Make sure to save the changes to apply the new API key.
If you want to know more details about map API please visit the link:
How to generate and restrict API keys for Google Maps Platform