New to VisionScaper?
Start here
Help Center › Get your API keys › Get your Google Maps keys (address autocomplete, 3D, route planner)
Get your Google Maps keys (address autocomplete, 3D, route planner)
Create a Google Cloud project, turn on billing and the right APIs, make two restricted keys and paste them into VisionScaper.
VisionScaper can use Google for address suggestions, “Explore in 3D” and the Route planner. These features are optional. Without a key, addresses are suggested from OpenStreetMap instead.
What VisionScaper uses
| VisionScaper field (Settings → VisionScaper) | Used for | Google API to enable (named in the field’s help text) |
|---|---|---|
Google Maps API key (optional), maps_key |
Address autocomplete and “Explore in 3D” in the browser | Places API (New) and Maps JavaScript API |
Google server key for the Route planner (optional), maps_server_key |
Driving distances, nearby restaurants and gas prices, looked up from your server | Routes API and Places API (New) |
If the server key is empty, VisionScaper uses the first key for the Route planner too.
Before you start
- A Google account you will keep for the business.
- A payment card. Google Maps Platform needs billing turned on. Pricing and any free usage are set by Google and change; read Google’s current pricing page. This article does not quote prices.
- Your website address, for example
https://yoursite.com. - Your web host’s server IP address (ask your host) if you want the server key locked to your server.
Steps
- Sign in at the Google Cloud Console (console.cloud.google.com).
- On the project selector, click Create Project. Name it something like “VisionScaper” and create it.
- Make sure billing is enabled for that project. Google says a billing account must be set up first. Follow the on-screen prompts to add one.
- Open the Maps API Library page (Google Maps Platform). Click each API below. If the button says ENABLE, click it. If it says MANAGE, it is already on.
– Places API (New)
– Maps JavaScript API
– Routes API (only if you use the Route planner) - Go to Google Maps Platform → Credentials. Click Create credentials → API key. Click Close on the “API key created” box. This is your website key.
- Open the key and restrict it before using it:
- Under application restrictions choose a website (HTTP referrer) restriction.
- Add your site with the scheme, for example
https://yoursite.com(Google also accepts wildcards for subdomains, such ashttps://*.yoursite.com). - Under API restrictions choose Restrict key and select Places API (New) and Maps JavaScript API.
- Save.
- Optional: make a second key for the Route planner. Create another API key, restrict it by IP address (your server’s IPv4 or IPv6 address), and under API restrictions select Routes API and Places API (New). Save.
- In WordPress go to Settings → VisionScaper.
- Paste the first key into Google Maps API key (optional). Paste the second into Google server key for the Route planner (optional).
- Click the Save button at the bottom of the page.
Tips
- VisionScaper sends your website address as the referrer when it calls Google from the server, which is why a website-restricted key still works for the first key. A key restricted only by IP will not work for the browser features.
- Never share the keys in emails or screenshots. If one leaks, create a new key in Credentials and delete the old one.
- Watch your usage on the Google Cloud billing page so there are no surprises.
If something goes wrong
- Suggestions still come from OpenStreetMap: the key is empty, saved wrongly, or Places API (New) is not enabled. Re-check steps 4 and 9.
- “Explore in 3D” does not appear or the map will not load: confirm Maps JavaScript API is enabled and that your site address is in the referrer list exactly as visitors see it (with or without
www). - Route planner shows estimates only: the Routes API may be off, or the server key’s IP restriction does not match your host’s current IP.
- Billing errors: open Billing in Cloud Console and confirm the project is linked to an active billing account.
Sources
- https://developers.google.com/maps/get-started (read)
- https://developers.google.com/maps/documentation/places/web-service/cloud-setup (read; high-level only)
- https://developers.google.com/maps/api-security-best-practices (read)
- Field names and API names: VisionScaper plugin settings code.
Unverified: exact Cloud Console button names for choosing the restriction type (the pages read describe the restrictions but not the screen labels), and the exact wording on the key’s edit screen.