Obtaining Google Maps Static API Key¶
To use the Google Maps Static API in your application, you need to obtain an API key.
Follow these steps:
- Go to the Google Cloud Console: https://console.cloud.google.com/
- Create a new project or select an existing one.
-
Enable the Google Maps Static API:
-
In the sidebar, click on "APIs & Services" > "Library"
- Search for "Maps Static API"
- Click on "Maps Static API" and then click "Enable"
-
Create credentials for the API:
-
In the sidebar, click on "APIs & Services" > "Credentials"
- Click "Create Credentials" and select "API Key"
-
Restrict the API key (recommended):
-
In the API key details page, click "Restrict Key"
- Under "Application restrictions", choose "IP addresses" and add your organization's ASN IP
- Under "API restrictions", select "Restrict key" and choose "Maps Static API"
- Copy the API key and paste it into your
App.config
file: