Overview
Maton calls Google Maps Platform with an API key from your own Google Cloud project. Each Maps API is turned on separately in that project, and the requests Maton makes are billed to the project's billing account, the same as if you called Google directly.
What You'll Need
- A Google account
- A Google Cloud project with billing enabled. Google Maps Platform requires a billing account, even for usage inside the free monthly allowance.
Step 1: Choose a Google Cloud Project
- Sign in to the Google Cloud Console.
- Pick an existing project from the project selector at the top, or create a new project for Maton.
- Make sure the project has a billing account linked.
Step 2: Enable the Maps APIs You Need
Open each API you plan to use and click "Enable". Maton supports these:
| API | Used for |
|---|---|
| Places API (New) | Search for places, read place details, autocomplete |
| Routes API | Directions and route matrices |
| Geocoding API | Turn addresses into coordinates and back |
| Address Validation API | Check and standardize postal addresses |
| Time Zone API | Time zone for a location |
| Maps Elevation API | Elevation for locations |
A newly enabled API can take a few minutes before it starts accepting requests.
Step 3: Create an API Key
- Go to APIs & Services → Credentials.
- Click "Create credentials" and choose API key.
- Under API restrictions, choose "Restrict key" and select the APIs you enabled in Step 2, so the key can't be used for anything else.
- Leave Application restrictions set to None. Maton calls Google from its servers, so a website or app restriction blocks every request.
- Save the key and copy it. Google Maps keys start with
AIza.
Step 4: Connect Google Maps
- Go to the Connections page, click "Add Connection" and choose Google Maps. With the Maton CLI, run
maton connection create google-mapsinstead; it opens the same form. - Paste the API key from Step 3 and click "Connect".
- Maton checks the key with Google, and the connection is ready once you see "Success".
Troubleshooting
- "API key not valid": the key was copied incompletely or has been deleted. Copy it again from the Credentials page, or create a new one.
- "Permission denied" or "This API is not activated on your API project": enable that API in Step 2 and add it to the key's API restrictions. If you just enabled it, wait a few minutes and try again.
- Billing errors: link a billing account to the project, as described in Step 1.
Keeping Your Key and Costs in Check
Requests made with the key are billed to your Google Cloud project. Restricting the key to the Maps APIs you use, and setting budget alerts or API quotas, keeps unexpected usage visible. You can delete or rotate the key at any time on the Credentials page; the Maton connection stops working once you do. Deleting the connection in Maton removes the stored key.