⚡ GMapsBook.com is crafted by Jozef Sorocin and powered by:
- g-Xperts (Google Cloud & Business Profile Partner)
- Spatialized.io (Elasticsearch & Google Maps consulting)
- and Garages-Near-Me.com (Effortless long-term parking across Germany)
Use caseApproachAccount, Project, Billing AccountGenerating a keyEnabling the APIsProtecting the API key(s)API RestrictionsHTTP Referrers
The Maps Platform runs on the Google Cloud Platform (GCP).
Roughly speaking, GCP is Google’s answer to Amazon’s AWS and Microsoft’s Azure.
But in terms of geospatial tooling, nothing comes close to Google’s extensive offering.
Now, even if you only intend to use GCP’s map-related features, you’ll still need:
- a GCP account
- a GCP billing account
- a GCP project
- and a GCP Maps Key.
That’s a bunch of new terms so let’s visualize a typical, moderately complex scenario which will help us understand the moving parts.
Use case
I have a web application consisting of a frontend and a backend. I need two separate API keys – one to display a map on the frontend and another to run geospatial workloads from the backend.
Approach
From GCP’s point of view, the hierarchical architecture for the above scenario looks as follows:
↳ (user) account
↳ billing account
↳ project A
↳ Frontend API key
↳ Backend API key
↳ Development/testing key (optional)
Account, Project, Billing Account
Assuming you already have a google account (e.g. a @gmail.com email or a company email running on Google Workspace):
- Visit console.cloud.google.com
- Click on the "Select a Project" dropdown in the top navbar and then click on "New Project".
- Give your project a name and click "Create".
- Wait for the project to be created. This may take a few minutes.
- If you don’t have a billing account, you’ll be prompted to create one. FYI, almost every new billing account gets $200 USD of monthly credit towards Maps usage.
Generating a key
- In the Google Cloud Platform console, select your project from the dropdown in the top navigation bar.