1

The code has not been amended for more than 4 years and now Google maps does not load, say:

This page has not loaded Google Maps correctly. See the details technical of the problem in the console of JavaScript

Here's a screenshot of the error:

google maps error

7

1 Answer 1

4

I too faced this issue in one of my integration, Actually Google updated their Javascript map API recently and now it is mandatory to integrate key with javascript map api.

I believe right now you are having this in your code base,
<script type="text/javascript" src="https://maps.google.com/maps/api/js"></script>
replace it by adding a key parameter,like that,
<script type="text/javascript" src="https://maps.google.com/maps/api/js?key=<your_api_key>"></script>

It is very recent change that's why you start getting this problem, As per recent update now its mandatory to use key with the JS api, if your api not having key then it shows that default error with 25000 limitation.

To get the Google Dev API, follow following steps:

  • Just go to Google API Console and login with your google credential,

  • Create a project and then create an API key from that Project

  • Enable Google MAP to use that key in the Project.

that's it, you get your basic Dev account, which having 25000 map loads limit per day, if your application require more loads, then use different account keys (Economical solution but not recommended) or just go for a premium purchase[Recommended]
More info on get API: http://thegrue.org/google-map-javascript-api-key/

5
  • let me and other know if it works for you. Feb 21, 2017 at 14:54
  • Hi again! I have a problem. following the steps in this link thegrue.org/google-map-javascript-api-key I have created the key but when I want to associate it to a domain, I requests that it check and not I can because the domain not is mine is of Salesforce. You like you did? Feb 21, 2017 at 16:10
  • Well in my case, I didn't restrict API to be called from any particular domain, or network. What you want to achieve here, you want it from your domain only? Feb 21, 2017 at 16:15
  • Yes, would be ideal, especially for security issues perhaps? But if has worked for you without this and have had no problems. Now for me the important thing is application and so it work. Now i have to do more tests. But many, many thanks! Feb 21, 2017 at 16:28
  • Yes, you are right, by adding API key restriction you can make your API, calls more secured, or just restrict to use the API from you preferred way. but ultimately you can't do much more with this key as it is always on client side, and it is designed in such a way that it will not make any impact if anybody want to be use that, Feb 21, 2017 at 16:55

Not the answer you're looking for? Browse other questions tagged .