Google maps is a powerful tool which Homhero-built websites use to display interactive maps featuring search results, and individual listing locations.
The service is provided by Google FREE to customers who would have less than 28,500 map impressions (every time the map is loaded for a website visitor) per month. Above that threshold there is a charge to use the service - more information regarding pricing can be found here - https://mapsplatform.google.com/pricing/
Because of this, Google requires that you have a Google account with up-to-date billing details to use this service, and that you use an API Key to link the website maps up to your Google account.
The steps for creating a Google Maps API Key are listed below. We do recognize that there are numerous steps to this process and this can cause confusion - for this reason we are happy to make ourselves available to assist you in setting up and testing the API key. If you would like assistance with this, please ensure you have Teamviewer installed and contact the Homhero Web team - websites@homhero.com.au / (07) 5588 5104
The following instructions assume you already have a Google account and are logged in - this is a requirement of setting up an API key:
Create a Project
-
Create a new Google Cloud project in the Cloud Console:
Click here to Create new project -
On the New Project page, fill in the required information:
-
Project name: This is for your reference only - it can be named anything
-
Project ID: Accept the default or click EDIT to enter a customized ID that Google APIs use as a unique identifier for your project.
After you create the project, you cannot change the project ID, so choose an ID that you'll be comfortable using for the lifetime of the project. Don't include any sensitive information in your project ID.
-
Billing account: Select a billing account for the project. If you haven't set up a billing account or only have one billing account, you won't see this option.
You must be a Billing Account Administrator or Project Billing Manager to associate a project with a billing account. For more information, see the billing access control documentation.
-
Location: If you have an organization you want to link your project to, click Browse and select it; otherwise, choose "No organization".
For more information, see Creating and Managing Folders and Relationships between organizations, projects, and billing accounts.
-
-
Click Create.
Enable Billing
To deploy your apps, you must enable billing. Your account will not be charged if you stay within your free quota. If your application needs resources that exceed the free quota, you will be charged for the additional usage.
If you have a billing account when you create a Cloud project, then billing is automatically enabled on that project.
To enable billing on a Cloud project:
-
In the Cloud Console, go to the Billing page:
-
Select or create a Cloud project.
-
Depending on if a billing account exists or if the selected Cloud project is associated with an account, the Billing page displays one of the following:
-
If billing is already enabled for the selected Cloud project, then the details about the billing account are listed.
-
If no billing account exists, you are prompted to create a billing account and associate it with the selected Cloud project.
-
If a billing account exists, you are prompted to enable billing if the selected Cloud project is not already associated with a billing account. You can also click Cancel and then click Create account to create and associate a new billing account.
-
After you enable billing, there is no limit to the amount that you might be charged. To gain more control over your costs, you can create a budget and set alerts. For more information, see Billing.
Enable APIs
You need to enable the following APIs so they will be available for your website to use
- Click here to Enable the Maps JavaScript API
Used to display Google Maps on your website - Click here to Enable the Places API
Used to query locations on a map (address lookup)
Create an API Key
-
Go to the Google Maps Platform > Credentials page.
- On the Credentials page, click Create credentials > API key.
The API key created dialog displays your newly created API key.
Please copy/paste this key and send it to websites@homhero.com.au - Click Close.
The new API key is listed on the Credentials page under API keys.
(Remember to restrict the API key before using it in production.)
Restrict Your API Key
An unrestricted API Key could potentially be used on any website and could count towards your map views quota and incur additional billing. For this reason you should restrict the key to work ONLY on your website.
-
Go to the Google Maps Platform > Credentials page.
- Click on the API Key you created previously
-
On the following screen under "Application Restrictions" select "HTTP Referrers (web sites)"
-
Under "Website Restrictions" click "ADD AN ITEM" and in the text box that appears, enter the following, but swap out example.com with your website address - do not include any https:// or www:*.example.com/*
So for instance for the website https://www.homhero.com.au we would put *.homhero.com.au/*
If you require any assistance setting up your API key, please contact us
(07) 5588 5104
Comments
0 comments
Please sign in to leave a comment.