Google maps setup
Posterno makes it easy to display listings with Google Maps. Usage of Google maps requires an API key in order to work properly.
Please note that Google Maps requires you to enter a billing information before providing you with an API key. While they include a fairly large free limit on accessing the maps API, once you cross this limit, they will charge your account automatically. For more information about Google Maps pricing please read their sheet here https://cloud.google.com/maps-platform/pricing/sheet/.
In this article
Creating a Google Maps API Key
Navigate to the Google Maps Platform and click on the Get Started button in the top right corner of the site. Select the Maps, Routes and Places check boxes and press continue.
If this is your first time creating an API key, you will have to create a Project first. Give your Project a name, then click the next button at the bottom-right of the window.
Wait for the billing prompt and select Create Billing Account. You'll be asked to enter a name for you Billing Account, as well as your Organization name.
Select your country and click continue.
Enter your customer info (details) and card information and then save and submit the billing information. Once your billing has been set up, you can move onto creating your API Key.
Create the API credentials
Click on the Credentials option on the API & Services menu in the right sidebar.
Click on the Create Credentials button on the Credentials window and select the API Key option in the next window.
Copy the generated API key to your clipboard. Return to your WordPress site and paste the API Key into the box labeled "Google Maps API Key" by navigating to "Settings -> Posterno -> Listings -> Maps".
Securing your API Key
After pasting the API Key to your WordPress site and saving the settings, return to the Google API Manager. You will want to restrict access to your API Key to avoid having it “hijacked” by other websites and going over your quota. Click on the api key you've just created to edit it's restrictions settings.
Select HTTP referrers (web sites) and enter the following domains under Accept requests from these HTTP referrers (web sites) replacing yourdomain.com with your domain name.
Please note that the Google Maps API is very specific about how domains should be formatted – please use exactly that format.
Enable required API functions
Now you need to make sure that the required API functions for your project are enabled. Click the Library link in the API & Services sidebar menu and make sure that the following APIs are enabled:
- Places API
- Directions API