Google Maps API Key
The Google Maps API allows your SiteWrench site to embed Google Maps into pages or retrieve data from Google Maps. The customization for these maps varies based on the tools used and data supplied by Google.
Any SiteWrench site that uses the Locator or the Store Directory page parts, must have a Google Maps API Key to function.
What do I need to do?
Short answer: If you already have an API Key, go get it and add it to your site's settings.
YourSiteURL.com/admin/settings/general.aspx (replace “YourSiteURL.com” with your organization’s domain.)
The longer answer...
There may be a cost from Google associated with using a Google Maps API Key. Google explains billing for the API key https://developers.google.com/maps/billing/gmp-billing
- A Google Account (If you don't have one, we can show you how to get one.)
- A Payment Method
- To subscribe to Google Maps API services
This article covers setting up a payment method and subscribing to the API services.
Create A Payment Method
1. Go to https://cloud.google.com/ and sign in with your Google Account and choose Get started for free.
2. Once signed in, choose Payments & subscriptions, then follow the instructions to add a new payment method, then choose Start my free trial.
The first part's complete!
Subscribe to Google Maps API Services
Head over to https://console.cloud.google.com/
Expose the left menu and choose APIs & Services
Select Enable APIs and Services
From the API Library, search Maps
You'll need to subscribe to 2 services
Choose one of the services and then Enable it. Follow the same procedure for BOTH services.
Now that you have enabled the services for your account, the next step is to create your key. From the Google Cloud Platform dashboard, choose Credentials from the left menu and then select Credentials in APIs & Services.
(At this point if you already have an API key, it will be visible.)
From the Credentials dashboard, choose +Create Credentials and then select API Key
If you see a message like the one below, CONGRATS you're now the owner of a new Google API Key.
Copy that key, head back over to your website Settings > General
Paste the key in the field and save.
DO NOT close the Google Console or dismiss that modal because we'll want to add some security to your API key.
That's it! You're done with the SiteWrench part of things.
Restrict Your Key
Go back to that window and modal that you didn't close. Choose Restrict Key
At the top of this screen, you really should name your API Key so you know what it’s used for. Your website URL is a good name choice.
Three steps to restricting your API key
1. Application Restrictions - set which websites can use your API key.
Choose HTTP, then Add an item. You will need to do this twice to add 2 URLs
- First, add your domain exactly like this (but use your website address instead of madebyspeak.com):
- Next, repeat the process and add your alternate URL (the one used before your website launched) exactly like this
- Choose the Restrict key option
3. Save your work and now you're truly done. Nice job!
Article is closed for comments.