New Error with Geocoder

By nmsinc - August 3, 2018

On August 1, 2018 our Geocoder page started reporting the following error:

"This page can't load Google Maps correctly."

It has worked properly for the last four years so I think it must be a Goggle change. Anyone else seeing this error?

- nmsinc

nmsinc

By daniel - August 8, 2018

Hi nmsinc,

One thing that can cause this error is an API Key issue. Can you please confirm that you've signed up for a Google Map API Key (https://developers.google.com/maps/documentation/javascript/get-api-key) and that the key has been set correctly at the top of plugins/geocoder/geocoder.php:

$GLOBALS['GEOCODER_GOOGLE_API_KEY'] = '***Your API Key Here***';

Thanks,

Daniel
Technical Lead
interactivetools.com

By nmsinc - August 9, 2018

Thanks for the update on this issue - looks like I need to update my geocoder to the new version!

- nmsinc

nmsinc

By rez - August 16, 2018 - edited: August 16, 2018

Hi  nmsinc, did you resolve this?

IT, I'm getting this notice on a site as well and I'm trying to update to the latest Geocoder plugin. This is in the interactivetools readme:

"Note that the Google Geocoding API no longer requires a Maps API key. You'll
only need a Maps API key if you choose to use Google Maps API v2."'

But it also says:

"First, if you're planning to display your geocoded addresses on a Google Map,
you'll need to get an API key. The steps to do this are below:"

https://developers.google.com/maps/documentation/javascript/get-api-key

When I go to this URL, it's nothing like the readme file and there is a get started button with the cloud that wants me to create a project and then setup an account. I created the project but when continuing, it then lists my credit cards and a free trial button. Am I doing this correctly? A free trial leads to a paid account. If this embedded map gets over a certain number of visits am I going to get charged? I have too many sites to start putting my CC in there. We have to pay now or what? If that's the case, even with multi location businesses, I'm doing a pic of a map and a link to directions which pops open the app on your phone anyway. The most complex thing I'm doing is having visitors enter their address and clicking get directions. Unnecessary these days.  However, I do a few franchises and yes, it would be nice to show the nearest location and miles on their website.

Anyway, I'm lost. Please explain how I get a free API with a limited amount of visits or has this changed? 

By daniel - August 24, 2018

Hi All,

Due to some recent changes by Google (https://developers.google.com/maps/billing/important-updates), the info in the plugin readme.txt is no longer 100% accurate. We've been looking into the changes and will be updating our documentation with the next plugin release, but for now, I can share some of this new information with you here.

Google now provides a $200/month credit towards their API services. This translates to 40,000 geocoding requests per month (https://cloud.google.com/maps-platform/pricing/sheet/), which should be sufficient for most projects. Accessing the API does now require setting up a billing account with a CC number, but the credit will be applied automatically each month.

If you are at all concerned about exceeding the credit, it's possible to set a hard cap on API usage using quota limits (https://cloud.google.com/apis/docs/capping-api-usage). These limits are per-day, so for the Geocoding API that would work out to roughly a "1300 requests per day" quota limit to stay under $200. Budget alerts are also available (https://cloud.google.com/billing/docs/how-to/budgets) to get notifications about overall billing account usage.

To get an existing API key up and running with the new system, you can try checking out this link: https://cloud.google.com/maps-platform/user-guide/ and clicking on the Transition Tool. This tool will help identify any steps you'll need to take to reactivate the API. Alternately, here are our updated instructions for setting up a new key:

  • Visit https://developers.google.com/maps/documentation/geocoding/get-api-key
  • Click 'Get Started'
  • Select 'Maps' and click 'Continue'
  • Click the drop-down to either select an existing project or create a new one, 'Next'
  • Follow the steps to create/enable a billing account for this project.
  • Accept the prompt to enable the Maps API.
  • Copy the API key and paste it into the value for $GLOBALS['GEOCODER_GOOGLE_API_KEY'], and click 'Done'
  • (Optional) Click 'Secure Credentials'
    • Under Application Restrictions, select HTTP Referrers
    • Add the domain for the website(s) this API key will be used on (for example localhost, example.com, 8.8.8.8)
    • Click API restrictions
    • Select the Geocoding API from the dropdown
    • Click Save

Let me know if you have any questions, or if there's anything else I can help with.

Thanks,

Daniel
Technical Lead
interactivetools.com