Extensions

Search Extensions

Google Maps API Key Restrictions

You can use your own Google Maps API Key with The Events Calendar to get more out of your venues and maps.

A Google Maps API key, when used a lot and uncontrolled, can incur costs. In order to have some control over it, you can put some restrictions on the key. However, that doesn’t always play out well.

The Events Calendar requires three APIs to be enabled: the Maps JavaScript API, the Geocoding API, and the Maps Embed API.

(You can find detailed information about setting up your Google Maps API Key in this article.)

These APIs, however, cannot work with the same restrictions. The workaround is to use two separate Google Maps API Keys.

Setting up the keys

You will need to set up two API keys in your Google Cloud Platform Console.

Use one Google Maps API Key for JavaScript map displays (Maps JavaScript API – The Events Calendar; Maps Embed API – Events Calendar Pro). For this key should select β€œHTTP referrers (web sites)” restriction.

Setting up key restrictions for displaying maps

Use a different API Key for venue geolocation lookups (Events Calendar Pro) with Geocoding API. This key should select β€œIP addresses (web servers, cron jobs, etc.)” restriction.

This screenshot should also be helpful in the explanation.

Setting it up in your calendar

You will need to enter both API keys in your settings. By default, you only have one field for a Google Maps API key.

This extension will add an additional field below that, under Events β†’ Settings β†’ APIs tab.

In the first “Google Maps API key” field enter the API key that you set up for JavaScript map displays.

In the second “Google Maps API key for Geocoding API restriction” field enter the API key that you set up for the Geocoding API.

Changelog

  • Version 1.0.0
    • May 8, 2021
    • Initial release

Download Extension

πŸ‘‹ Heads up! We provide limited support for extensions, but you can still open a ticket over at our Help Desk to report any issues.
Install Instructions