Are you getting, “Ooops! Something went wrong. This page didn't load Google Maps correctly. See the JavaScript console for technical details?”
Don't worry; I've got the solution to your problem, and I can help you fix it. Or, if you wish, you can hire me to solve the problem for you.
The problem is that Google Maps introduced a requirement to connect your maps to the Google API. I'll explain more about the Google API later, so let's focus on fixing your issue.
You need to get a Google API key to fixing the “Ooops! Something went wrong.” message and correctly display your Google Map on your website.
Here are the following steps to getting the Google API Key:
- Go to the Google Maps API in the Developers Console.
- Select Create a Project and then click continue. Note, this takes a minute. Be patient.
Next, you will do steps three through six as shown in Image google-api-key-image-12-2-2016-2
3. Enter the name of your client or grouping under “name.” Your information goes under the “API key” heading.
- Select the type of key restriction you wish. For websites, use “HTTP referrers (websites)
- Enter the domain of your site under “Accept requests from these HTTP referrers (websites). Use the *. Before your domain name followed by /* if you have multiple subdomains. The asterisk denotes a “wildcard setting” for your domain.
-
Click “Create” and wait for the settings to take effect. It may take up to five minutes for your API key generate.
If you do not see your API Key generated, select “Library” and follow these steps:
- Look for “Google Maps API”
- Select “Google Maps JavaScript API”
- Click on “Create Credentials” in the top right hand corner
- Click on “What credentials do I need?
- You will now have an API Key, Name the key according to your project. Copy this and paste it into the Google API location in your website administrator panel.
- Select “HTTP referrers (websites)
- Enter your domain name in the “Accept requests from these HTTP referrers (websites)” field.
- If you're website uses “http://yourdomain.com” and http://www.yourdomain.com” enter *.yourdomain.com/* otherwise specify the specific domain name and subdomain.
- Click Save.