Internet Marketing Agency | WordPress Websites & Online Marketing

Do I need a Google Maps API key?

Follow

Do I need a Google Maps API key?

Yoast SEO: Local allows you to add two different Google Maps API keys. We will briefly explain why you need them both.

Google Maps JavaScript API browser key

The Google Maps JavaScript API browser key is used to display maps on your website. Without this key, you’ll see the following error:

Oops! Something went wrong.
This page didn’t load Google Maps correctly. See the JavaScript console for technical details.

The same error also shows when you enter an invalid browser key.
googlemaps_error

If you see this happening, you can check your JavaScript console for the exact error message. Google listed all errors, and their explanation, at https://developers.google.com/maps/documentation/javascript/error-messages.

Google Maps Geocoding server key

The Google Maps Geocoding server key is necessary to translate addresses into geographical locations (latitude/longitude). When you create a new location, Yoast SEO: Local uses the Google Maps Geocoding API.

Without this key, or if it is invalid, your new location’s address will not be translated into a geographical location. However, no error will be shown.

Get your Google Maps API keys

Please refer to the following articles to generate and set your Google Maps API keys.

  1. Get a Google Maps JavaScript API browser key
  2. Get a Google Maps Geocoding server key
Have more questions? Submit a request