If you own a WordPress website and you have installed the standard WP Google Maps plugin, you might be facing the “This page can’t load Google Maps correctly” error for your location map. This error message has become a lot more common since Google Maps started asking for a Google API key and Google Cloud Platform billing account to enter the core Google Maps APIs from June 2018. If you started using Google Maps on your site on or after June 22, 2016, then you will require to register for and implement an API key – if your map pre-dates that, it is grandfathered in and does not need an API key.
Google has not started setting up an API key very helpful for beginner site users. Their interface is equipped with website developers and designers. This guide is for WordPress website owners that need to understand how to fix the “This page can’t load Google Maps correctly” error.
Find the Cause of This page can’t load Google Maps coMissingKeyMapError
First, let’s get out exactly why the error is appearing. Many things can create it but luckily, Google provides us a way to discover a distinct reason. This supports us understand what to do to fix it. Mark the last part of the error that says to check the JavaScript console for technical details. That’s what we want.
- You can navigate to the JavaScript console in your browser with a few clicks.
Opening the “Console” panel of Chrome’s DevTools:
- Windows and Linux: Ctrl + Shift + J
- Mac OS: Cmd + Opt + J
Here are the most frequent errors stated by our users.
- MissingKeyMapError – An API key is missing
- ApiNotActivatedMapError – Enable API key
- RefererNotAllowedMapError – Key doesn’t approve your URL
- InvalidKeyMapError – The API key inserted is incorrect
Solutions for the This page can’t load Google Maps correctly Error
Now that you recognize precisely what is creating the error, you can fix it. Listed below are fixes for the most frequent Google Maps API errors noted in the console.
Fix MissingKeyMapError
MissingKeyMapError indicates you have not inserted an API key and will require you to sign up for one then configure your site to use it. Websites that began using Google Maps on or after June 22, 2016, need an API key for maps to display.
Create a Google Maps API Key
Follow these measures to achieve a Google Maps API Key. Google provides you a very big amount of free credits every month which delivers its maps service virtually free. Even so, you can place alerts and limits.
- Navigate to the Google Maps Platform welcome page then tap Get Started.
- Select Maps, Places, and Routes then tap Continue.
- Sign in to your Google Account or register for a new one, if necessary.
You may require to repeat the early steps after logging in. - Select ‘Create a new project’, insert a name, then tap Next.
- Now you have to set up billing for your new project then continue to enable your APIs.
Google provides you such a big volume of free credits every month that to date none of our clients have reported can i buy xanax online requiring to pay. - Tap on the API Console link to restrict API key uses to your site only.
- Following Application restrictions, select “HTTP referrers (websites)” then add the 2 insertions below (replacing ‘yourname.com’ with your website’s domain name). Enter the first entry then press ‘Enter’ on PC’s keyboard to add it. Repeat to add the next entry. Having both entries will help secure your maps work on any URL of your domain’s website.
- Tap Save then copy the API key that is now displayed on the screen.
- If you have installed the WordPress plugin, navigate to Settings -> Church Content -> Locations to paste that copied API key into the Google Maps API Key box then press Save Changes. Otherwise, do alike according to the product you are using.
Fix ApiNotActivatedMapError
Google Maps has more than a dozen diverse APIs. The Google Maps JavaScript API is the most famous. Whichever API you are applying, it is probable that it is not permitted in your account. Follow to fix the ApiNotActivatedMapError error by allowing the API you are applying.
- Navigate to https://console.developers.google.com/apis/library
- Following ‘Maps’, tap ‘View All’ to view all APIs.
- Press the API you are using. Our plugins and themes use the Maps Static API, Maps JavaScript API, and Geocoding API. Your product may use something separate but the JavaScript API is most typical for a website.
- Tap on the Enable button at the top of the page and wait a few minutes for the modifications to take effect (Google tells modifications can take up to five minutes).
- Follow the same for other APIs you have taken.
Fix RefererNotAllowedMapError
RefererNotAllowedMapError is one of the most raised errors we have observed apart from not using a key. The browser’s console will also display a message like “Your website URL to be authorized”. It links to Step three above when generating an API key. Here’s how to solve the error.
- Navigate to https://console.developers.google.com/apis/credentials
- Tap on your API key’s name to update its settings.
- Following Application restrictions, select “HTTP referrers (web sites)” then add the 2 entries below replacing ‘yourname.com’ with your website’s domain name). Enter the first entry then press ‘Enter’ on PC’s keyboard to add it. Repeat to add the next entry. Having both entries will help secure your maps work on any URL of your domain’s website.
- Tap on the Save button then waits for a minute for the modifications to take effect (Google tells modifications can take up to five minutes).
Fix InvalidKeyMapError
InvalidKeyMapError just indicates the key you inserted is wrong. It means, you created an API key but did not insert it into your website perfectly.
- Navigate to https://console.developers.google.com/apis/credentials
- Copy the API key you have generated.
- If you have a WordPress plugin, navigate to Settings -> Church Content -> Locations and paste the copied key into the Google Maps API Key box then tap Save Changes. Otherwise, do alike according to the product you are using.
Conclusion
We believe Google will enhance the process of generating an API key now that they have made it a necessity for millions of non-developer website owners. Until then, we hope this guide will be valuable to most of the readers.