Skip to content

Enter Google Maps API Key

Ramil Valitov edited this page Nov 10, 2016 · 3 revisions

Overview

This Map widget is based on Google Maps API that requires to set a key that allows you to use the service. The Google Maps API is free for moderate usage (e.g. websites with small traffic), and requires payment if you go over the limits. Usually Google prevents you to use the widget without setting the key.

How to set Google Maps API key

Obtain the key

If you don't have the key, then you should obtain it first. You can read about it at Google manual, or follow the instructions below:

  1. Log in into the Google Console. Then Create credentials for API key:

Create API Key for Google Maps

  1. Choose Browser key:

Google Maps API key Browser key

  1. Configure the key by entering name of the project (arbitrary name) and the domain (or domains) that your project uses:

Configuration for Google Maps API key

  1. After you save the key, make sure that it appears as a browser key in the list of your API keys:

Configuration for Google Maps API key

You can copy the Key parameter which you should enter in the MapEx settings.

  1. Make sure that necessary Google API are enabled in your account. You can check enabled API in the Dashboard:

List of Google API

You should have the following API enabled:

  • Google Maps Directions API
  • Google Maps Directions API
  • Google Maps Distance Matrix API
  • Google Maps Elevation API
  • Google Maps Embed API
  • Google Maps Geocoding API
  • Google Maps JavaScript API
  • Google Places API Web Service
  • Google Static Maps API

If any of the API above is not listed or disabled in your case, then, please, enable them manually in the Library:

Google API Library

Set the Google Maps API key in the widget

Newer versions of Widgetkit support Google Maps API key option natively. If you use Widgetkit version 2.7.5 or later, then you can configure the key value in the Widgetkit's settings:

Google Maps API key settings of Widgetkit

For older versions of the Widgetkit you can enter the Google Maps API key in the "Global Settings" tab, see the screenshot below:

Google Maps API key settings for Yootheme Map Widget

In any case we allow you to verify the key and will show the error messages if the key doesn't work.

Notes

The Google Maps API key setting is global. It means that if you set or change it once for any single widget, then all other MapEx widgets will automatically use the new key.