How to register a Google Maps Javascript API key

Category:

User guides

Topic:

Layers

Maps Marker Pro is a WordPress plugin built on the javascript framework leaflet.js, which supports maps from OpenStreetMap and other free providers out of the box without any additional configuration or mandatory API keys.

If you want to use Google Maps though, you need to register a Google Maps Javascript API key.

Step-by-step tutorial

This tutorial will show you how to enable Google Maps in Maps Marker Pro by generating a Google Maps Javascript API key.

We recommend to create a unique key for Google Maps Javascript API in Maps Marker Pro only – even if you already registered a key for Google Geocoding (as other methods for securing your Google Maps Javascript API key e.g. against quota theft are needed, see “Optional steps (Recommended)” below for details!)

Prerequisite: you must have a Google account

  1. Navigate over to the Google Maps Platform
  2. Click on “Get an API Key” to get a Google API Project setup automatically for your site:
  3. Complete your Google profile (needed for new Google accounts usually only):
    1. Select your country, your organizations/needs and accept terms:
    2. Verify your identiy and contact information:
    3. Verify payment information (only used if 200$ monthly credits are exceeded):
    4. Finish by clicking “Start my free trial”
  4. Copy your key to the clipboard
  5. Log in on your WordPress Admin and navigate to Maps Marker Pro / Settings / Layers / “Google Maps” and paste your API key into the field “Google Maps JavaScript API key”
  6. Finish configuration by clicking the “Save” Button – you are now able to use Google Maps for maps in Maps Marker Pro:

Optional steps (recommended)

Secure your API key to prevent quota theft for example.

Please be aware that if you enable those restrictions for your Google Maps Javascript API key, that API key cannot also be used for Google Geocoding (which needs restrictions by “IP address” instead) – instead you need an additional key (see related Google geocoding tutorial).

  1. Open Google Cloud Plattform (Enabled APIs & Services / Credentials)
  2. Click on “Edit API key” next to your created Google Maps Javascript API Key:
  3. Select “HTTP referrers” and add your domain in the format *.yourdomain.com/* to “website restrictions”:

    Optionally you can also set “API restrictions” to “Google Maps Javascript API”
  4. Finish by clicking on “Save” Button

Terms of services

“In June 2018 Google launched a new pricing plan. Google continues to offer a free tier — all developers will receive $200 of free monthly usage of our core products. In addition, this change will require you to enable billing and associate it with all of your Google Maps Platform projects. (full official announcement)” – for a summary on how this affects you as Maps Marker Pro user, please have a look at our FAQ at https://mapsmarker.com/google-maps-tos-changes

All Google´s related Terms of Services can be found at https://developers.google.com/maps/terms.

Usage limits

If you enable Google Maps JavaScript API within Maps Marker Pro to use Google Maps as basemaps, the following Google APIs will be used and billed according to the terms by Google:

  • Dynamic Maps (Pricing: USD 7.00 for up to 28.000 loads per month – pricing details)

As Google gives all developers $200 of free monthly usage, only loads which exceed this amount will be directly billed by Google.


Updated on 29 May 2022