The #1 mapping solution for WordPress sites
Ready-to-use with free maps & free geocoding

How to setup Google geocoding

Maps Marker Pro has a built-in geocoding framework which allows you to choose which geocoding provider to use. The default geocoding providers Algolia and Photon@MapsMarker based on OpenStreetMap data are ready to use out-of-the-box without any additional configuration or mandatory API keys. If you want to use Google for geocoding though, you have to register for a Google Geocoding API key – related details and links about terms of usage, pricing and billing can be found here.

Important update from Google regarding upcoming changes coming into effect on 11th June 2018:

“Today (3. May 2018) we are announcing important changes, including our new name – Google Maps Platform, a simplified product structure, pay as you go pricing for all, and more. Please take a few minutes to review the announcement to familiarize yourself with the upcoming changes.
We would like to highlight a few updates that may impact your implementation. Beginning June 11th, we are launching our new pricing plan and providing all users access to support. We’ll continue 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. Creating a billing account helps us better understand your usage so we can continue developing helpful products. It also allows you to scale easily with less downtime and fewer performance issues if your product grows beyond the $200 of free monthly usage. For additional visibility and control you can set daily quotas or billing alerts.”

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

Terms of services

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

Usage limits

Important update from Google regarding upcoming changes coming into effect on 11th June 2018:

“Geocoding is charged by request from Google, see the pricing table for details.”

If you enable Google Geocoding within Maps Marker Pro, the following 2 Google APIs will be used and the following minimum amounts will be billed by Google:

  1. “Autocomplete per character” with a minimum price of USD 2.83 for 1000 calls for up to 70.000 chars per month (pricing details)
  2. “Places Details” – Basic with a minimum price of USD 17.00 for 1000 calls for up to 11,000 calls per month (pricing details)

Those amounts will be offset with your $200 of free monthly usage – if you exceed those amount, you will be charged automatically by Google.

Not valid anymore starting from 11th June 2018:

If you enable Google as geocoding provider by adding your Google geocoding key, “Google Places API Web Service” (allowing up to 1.000 free requests/day) will be available for manual location search. If you enable pay-as-you-go billing by verifying your identity to Google with a credit card, up to 150.000 free requests/24-hour-period for manual location search are allowed – click here for more details. If you need an even higher quota, you need to purchase a Google Maps APIs Premium Plan license.

For the import feature and the Maps Marker APIs, “Google Maps Geocoding API” (allowing up to 2.500 free requests/day and a maximum of 50 requests/second) can be used. Once billing at Google has been enabled, you can exceed 2.500 requests/day and you will be billed by Google at 0.50 USD/1.000 additional requests, up to 100.000 daily. If you need an even higher quota, you need to purchase a Google Maps APIs Premium Plan license.

Tutorial: how to generate a Google geocoding key

This tutorial will show you how to create a Google Maps Geocoding API key (using this special server key has been supported since Maps Marker Pro v2.8/Leaflet Maps Marker v3.11).

We recommend to create a unique key for Google Geocoding only – even if you already registered a key for Google basemaps (as other best practises for securing your Google geocoding key against quota theft are needed, see below for details!) 

Prerequisite: you must have a Google account to generate a key for Google Maps Geocoding API.

  1. Go to the Google Geocoding API Console.
  2. Click ‘Get A Key’
    google-js-get-key
  3. Sign in with your Google Account (or create a new one first)
  4. a If you want to use an existing project, please select it from the list.
    b. Otherwise, select ‘Create a new project’, enter a project name and click on “Create an enable API”:
    google-js-create-enable-api
  5. Copy the generated key from the popup
    google-js-key-done
  6. Optional, but recommended to prevent quota theft: click on the link “API Console” below your API key and set an IP referrer for your key so that it can only be used on your domains.
    Do not set “HTTP referrers (web sites)” restrictions as it is recommended for Google basemaps, this will cause Google Geocoding API to break!
    – choose “IP addresses (web servers, cron jobs etc)” from “Key restrictions”
    – enter the IP address of your server to “Accept requests from these HTTP referrers (web sites)” (your hoster may assist you in providing the IP address or range of your server):
    google-js-ip-restriction
  7. Optional: Enable billing. See Usage Limits for more information. (billing is mandatory starting from 11th June 2018)
  8. Log in on your WordPress Admin and navigate to Settings > Geocoding > Google and  paste the server key you copied earlier into the “Google API server key” field:
  9. Click the “Save Changes” button at the end of the settings page.

If you also want Google Geocoding to be your default geocoding provider, please navigate to Settings / Geocoding / Geocoding provider and change the option “Main geocoding provider” accordingly.

Troubleshooting

If you have trouble translating addresses into geographical locations, please verify that the Google Maps Geocoding API is enabled in the Google Maps API Manager.


Reference for all Google Geocoding settings

 

Location Biasing

You may bias results to a specified circle by passing a location and a radius parameter. This instructs the Place Autocomplete service to prefer showing results within that circle. Results outside of the defined area may still be displayed. You can use the components parameter to filter results to show only those places within a specified country. If you would prefer to have no location bias, set the location to 0,0 and radius to 20000000 (20 thousand kilometers), to encompass the entire world.

language

The language in which to return results. See the list of supported domain languages. If you set a specific language at Settings / Google / “Google language localization”, that language will also be used for Google Geocoder. If no language is set, the current WordPress locale will be used.

region

Optional region code, specified as a ccTLD (“top-level domain”) two-character value. This parameter will only influence, not fully restrict, results from the geocoder. For more information see Region Biasing.

components

Optional component filters, separated by a pipe (|). Each component filter consists of a component:value pair and will fully restrict the results from the geocoder. For more information see Component Filtering.

0
0
31
Rate this user guide

Thanks for your feedback, please add a comment to help us improve this post.