Geocoder isn't auto-generate latitude and longitude coordinates

By Mikey - December 31, 2019 - edited: December 31, 2019

I've installed CMSB 3.53, downloaded the latest geocoder plugin, and followed all the directions to install. I set up a Google API credentials and applied the API Key to geocoder... but geocoder just wont auto-generate latitude and longitude coordinates on my websites. 

I have a CC on file with Google APIs, I also have the following enabled:

  • Maps Embed API - Make places easily discoverable with interactive Google Maps.
  • Maps Static API - Simple, embeddable map image with minimal code.
  • Maps JavaScript API - Maps for your website
  • Geocoding API - Convert between addresses and geographic coordinates.

I double checked my field type, geocoder to ensure the field names match... and these all check out fine.

Has anyopne else had this issue and/or have suggestions on how to get geocoder to auto-generate latitude and longitude coordinates?

Thank Zicky

By Mikey - December 31, 2019

I also tried the "Geocode Tables" (Admin > Plugins > Geocode Tables, and selected the table which needs to be
updated.) but got the following message: Error: STATUS_REQUEST_DENIED

No joy. 

Zicky

By Mikey - December 31, 2019

I've tacked down this issue I am having to having something to do with adding API Key Restrictions.

Google list the following as a suggestion on how to restrict the API to your website:

Any subdomain or path URLs in a single domain, using wildcard asterisks (*): *.example.com/*

This wasn't working however, and my website would not auto generate the latitude and longitude when I saved my record.

I tried a bunch of scenarios such as those listed below:

The Geocoder readme.txt file says to use:

  • example.com

I tried that also, but still wasn't able to get Geocoder to work.

The only way I can get Geocoder to work is by removing all restrictions on the "Application Restrictions" and "API Restrictions". Once I do this, it works fine, but I'd like to add restrictions to protect the API Key from being jacked. 

Anyone have any suggestions on what to try, in order to add restrictions?

Thanks Zicky

By daniel - January 2, 2020

Hi Zicky,

Thanks for following up with more details - you've managed to isolate the cause of the issue which is half the battle!

It looks like you've already tried a lot of the obvious domain/wildcard combinations, so I think to be of any help I'll need to know the specific site URL you're trying to use. If you'd prefer to not share that publicly on the forum, feel free to send it in a support request and I'll see if I can offer any other suggestions: https://www.interactivetools.com/support/request/

Thanks,
Daniel

Daniel
Technical Lead
interactivetools.com