Map Locations and Routes - Getting Started - Adding API Keys (Google Maps and OpenWeatherMap)
Adding Google API Keys
- Starting from July 2018, Google Maps, Routes, and Places require billing information, such as an associated credit card.
- The pricing system also changed, but in practice, the services are still free for limited use.
This guide will give you an overview of how to fetch keys for both services. Note that these steps depend on the interface and conditions of these third-party services, which are subject to change.
If you believe that this guide is out of date, please contact us.
Table of Contents
- API Keys - Which Ones are Needed
- API Keys - Finding the Plugin Settings
- Google API Key
API Keys - Which Ones are Needed
Google API Keys
If you would like to use the Google Map service, you will need to activate a series of services in the same API Key. The process to get all is the same and is explained in-depth below.
- WordPress Interactive Map plugin Free and Pro
- Geolocation API (For some features; requires HTTPS)
- Geocoding API
- Places API
- WordPress Travel Map plugin Free and Pro
- Geocoding API
- Places API
- Static API
- Elevation API
- Directions API
You only need the main key provided by the app.
Finding the Settings
In both plugins, the needed settings can be found under the Setup tab.
You will see a link to get the Google Maps API key and a field to enter it. Then click save to authenticate.
In both plugin you can also choose a Google Maps Language using the relevant option. Note: this option was introduced in the WordPress Interactive Map plugin in version 3.0.8 and WordPress Travel Map plugin in version 4.9.1.
Google API Keys - Obtaining the Google API Key
To obtain the Google API key, follow these steps:
- Head to the Google Developers webpage.
- Log in to your Google account.
- Go to your project or create a new one.
- Head to APIs & Services and then Library:
- Select one of the API from the list. You may have to search for it by using the search bar.
- This page is important. In it, you can enable the API and find resources about it. Click Enable:
- Repeat steps 5 and 6 for all the API keys you need to enable. Review which keys are necessary.
After you have enabled all the API Keys, activate the sidebar menu and click on Credentials. You will find the API key there, ready to be copied and pasted into the plugin's settings.
Also, if you have still not enabled billing, you can do so by activating the sidebar menu and then selecting Billing.
Then click Link a billing account and follow the steps.
ZIP Search Feature - Google API - Disabling Restrictions
The ZIP Search feature requires the "Application restrictions" to be disabled for all Google APIs.
Access the Google Maps section of the Google APIs. You can access it directly through the link https://console.developers.google.com/google/maps-apis/api-list
- Make sure you selected the right project
- Click Details to edit the setting of that API (you will do this for every API)
Click Credentials and then the pencil icon.
Under Application restrictions, make sure "None" is selected.
- Repeat steps 4 and 5 for all API services
OpenWeatherMap API key
If you want to add weather details to your maps, you will need to enter an OpenWeatherMap.org API Key the same way you did the Google Maps one. To obtain the API key create an account and login to http://home.openweathermap.org/.
This guide will walk you through the process while creating a new account.
Click Create an Account.
Enter your information
Choose a purpose for which you will use the maps
Click API keys and you will have access to the key. According to OpenWeatherMap, it can take a couple of hours for the key to be active.