Google Maps Issues: Index

Link: https://support.brilliantdirectories.com/support/solutions/articles/12000097715

There are 3 errors that can cause momentary interruptions to the Google Maps integration:


  1. Missing an API
  2. Missing HTTP Referrers
  3. Billing Errors


These errors can be identified using the browsers INSPECT TOOL:




The Google Maps Error Alert in the Admin

When Google refuses the Google Maps key, a red Google Maps Error button appears at the top of every admin page. The Google Maps API Status card on the dashboard (under My Website Resources) shows the same result. The card has two rows, because the site uses two separate keys:

  • Website key: used for maps and location search on the website. This key is tested in the browser.
  • Server key: used for member geocoding and imports. This key is tested from the server.


Each row shows its own result, such as Billing problem on your Google project, Google does not recognise this key, Maps JavaScript API is not enabled, or Google Maps key is working. Clicking a row, or the red Google Maps Error button, opens a details window that explains what Google reported and lists numbered fix steps.


Red, Amber and Green Results

The website key is tested from the admin first. When Google refuses the key only because the admin address is not in the key's website restrictions (normal for a key restricted to the website's own domain), the same test runs again on the website's live domain, exactly the way visitors use the key. That answer replaces the admin result, so a restricted key now shows a definite green or red result instead of amber.


  • Red: Google reported a real problem with the key, such as billing turned off, a key Google does not recognise, a required API that is not enabled, or Google refuses your key on your website when the live domain is missing from the key's website restrictions. The details window names Google's reason and lists the fix steps. Only red results raise the Google Maps Error button.
  • Amber (Maps blocked on this admin page): Google refused the key on the admin address and the live-domain test got no answer, because the domain is not connected to the site yet, does not resolve, or did not answer within about 20 seconds. This is not treated as an error and raises no alert. Check the website's own maps and location search directly, or test again once the domain is connected.
  • Green: Google accepted the key. Google Maps key is working means it was accepted on the admin address; Maps work on your website means it was accepted on the live domain (the admin address is refused, which only affects maps inside the admin).


The dashboard card shows the admin result first and switches to the live-domain result as soon as it arrives.


Testing the Keys on the Integrations Tab

Both keys can also be tested where they are entered: Settings > General Settings > Integrations, below the Google Maps Javascript API Key field.


The Integrations tab's Google Maps key tester, with numbered Website key and Server key result rows and the Edit both keys link.


  1. Website key: tested when the tab opens, again shortly after typing stops in the key field, and again after Save Changes. A key that has only been typed is tested from the admin; if Google refuses it only on the admin address, the row reads Blocked on this admin page - save to test it on your website. Once saved, the key is also tested on the live domain as described above. A value that is not shaped like a Google key is flagged without asking Google (keys start with AIza and are 39 characters long).
  2. Server key: tested from Brilliant Directories servers; the key itself is never sent to the browser. When no server key is saved, the row shows a grey No server key saved. A server key is only needed to geocode members during an import and for service-area search pages.
  3. Edit both keys - Save & test: opens the same key editor as the details window. Each Test link re-runs that row's test.


Clicking a result opens the details window with Google's reason, the fix steps and the key editor. A key Google refuses in the editor is not saved.



What the Details Window Offers

  • Google Cloud Console: opens the Google Cloud Credentials page in a new tab.
  • Test key: tests the website key with Google right now. When Google accepts the key, the Google Maps Error button clears immediately. The server key row has no Test key button; that key is re-checked when an admin page loads.
  • Your Google Maps Settings: the website key, the server key and the Use Places API (New) switch can be edited right in the window. Click Save & test and each key is tested with Google first. A key Google refuses is not saved. Leaving the server key empty keeps the saved server key. The switch is the same setting as Enable New Google Maps Places API in Advanced Settings.


Places API (New) switch.
The Use Places API (New) switch can only be turned on when the key works with Places API (New). If the switch will not turn on, the key most likely does not have Places API (New) enabled in Google Cloud. Enable it as described in Google Maps: Add APIs, wait a few minutes, and try again.


How the Alert Clears

After a fix, the alert clears itself. Admin pages re-check the keys about every 10 minutes and the Google Maps Error button fades once Google accepts the key. Test key or Save & test clears it immediately. A remembered error lasts at most 7 days. Placeholder sites on a directoryup.com address never show the alert, because the keys are checked only on live domains.


Missing an API


STEPS TO FIX: Google Maps Issues: Missing an API




Missing HTTP Referrers


STEPS TO FIX: Google Maps Issues: Editing HTTP Referrers



Billing Errors


STEPS TO FIX: Google Maps Issues: Billing Errors



****  Google requires that all Maps API Keys have a credit card on file for any charges that the API usage may incur. That is due to a change in their policy, beginning on June 11, 2018, Google requires all users to add billing information to their account in order to activate Google Maps API keys.

However, Google gives all users enough free credits each month so that the vast majority of websites will never have to pay anything for this service.  


In fact, with this update Google is actually giving users even more free credit than before.  The only difference is that they now ask for billing information during the setup process rather than after a user consumes all of their free credits.