Follow

How do I generate a Google API Key?

 

Since June 2016, Google Maps requires a special Google Maps browser key. Without this key, you cannot display Google Maps on your website.

 

Here is a tutorial on exactly how to generate a Google Browser key for MapifyPro:

https://mapifypro.com/how-to-create-a-google-browser-key/

If you prefer the written method, here is a very useful How to on how to generate a key. It only takes about a minute: https://churchthemes.com/page-didnt-load-google-maps-correctly/#RefererNotAllowedMapError

Here are some helpful tips specific to our software when generating your key:

  1. To have a key that works for any domain do not enter any value in the domain field and delete any added domains. So if you have just a wildcard character for the domain - remove that as well.
    Note that wildcard keys are not suggested for production use as they are public and exposed and any sites using the same key will count towards the same API usage limits.
    To specify a domain the best practice is to enter it as follows:
    *.yourdomain.com/*

  2. Make sure the generated key is a "Browser Key". When creating a new key you should see a popup asking what type of key you wish to create - make sure "Browser Key" is selected. You can confirm the key you already have is of the correct type if it says "Browser API key" at the top of the key details page in the Google API Console.

  3. Keys take time to update so even if you see an error when you've confirmed you've setup everything correctly it may still be down to just waiting 10-20 minutes for the settings to propagate throughout Google's servers.

  4. If after confirming your settings are correct, waiting enough time and you still see an error instead of rendered maps open up the browser console and see if there are any Google Maps error messages shown (attached is an example).

After you've succesfully generated your key, go to the MapifyPro tab in wp-admin, select "MapifyPro settings" and you'll see the field where you'll want to enter the key. All done!

1 Comments

  • Avatar
    bernardo gomes alevato

    ok, I trying using

    Google Maps JavaScript API

    and works, but when I put restricted to my domain (in google), stop works

    if you have any suggestions, i apreciate

    thanks

    Edited by bernardo gomes alevato
Please sign in to leave a comment.
Powered by Zendesk