Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Maps API Error with no changes in the page code

Today, with no changes in our code, Google Maps is not working, we are getting this errors today:

Uncaught TypeError: Cannot read property 'entries' of undefined
at js?key=api_key:102
at js?key=api_key:103
at Fa (js?key=api_key:26)
at js?key=api_key:101
at js?key=api_key:141
(anonymous) @ js?key=api_key:102
(anonymous) @ js?key=api_key:103
Fa @ js?key=api_key:26
(anonymous) @ js?key=api_key:101
(anonymous) @ js?key=api_key:141
search?v=_I0tOw3rSQ_doWiefjlY5aQCOGyEGSTSZnF3_H-NxWg1:1 

Uncaught TypeError: google.maps.LatLngBounds is not a constructor
at a (search?v=_I0tOw3rSQ_doWiefjlY5aQCOGyEGSTSZnF3_H-NxWg1:1)
at Object.d [as init] (search?v=_I0tOw3rSQ_doWiefjlY5aQCOGyEGSTSZnF3_H-NxWg1:1)
at HTMLDocument.<anonymous> (search?v=_I0tOw3rSQ_doWiefjlY5aQCOGyEGSTSZnF3_H-NxWg1:1)
at l (jquery?v=7Sd5PfzIDKXEDPMwZrZ0oOZN3B1M8lJMYBbJRNRKggY1:1)
at Object.fireWith [as resolveWith] (jquery?v=7Sd5PfzIDKXEDPMwZrZ0oOZN3B1M8lJMYBbJRNRKggY1:1)
at Function.ready (jquery?v=7Sd5PfzIDKXEDPMwZrZ0oOZN3B1M8lJMYBbJRNRKggY1:1)
at HTMLDocument.ht (jquery?v=7Sd5PfzIDKXEDPMwZrZ0oOZN3B1M8lJMYBbJRNRKggY1:1)

We are loading the API like this:

<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=KEY&v=3.exp&libraries=places&language=pt-PT"></script>

We did not change anything in the page and today when we try the page, nothing is working.

Any idea? Did Google changed anything between yesterday and today?

like image 367
Patrick Avatar asked Sep 13 '17 08:09

Patrick


1 Answers

You are using the "experimental" version of the API, try the release version. Details (from the documentation):

The current release version is 3.29. You can request it with either of the following bootstraps:

<script async defer
src="https://maps.googleapis.com/maps/api/js?v=3
    &key=YOUR_API_KEY&callback=initMap">

or

<script async defer
src="https://maps.googleapis.com/maps/api/js?v=3.29
    &key=YOUR_API_KEY&callback=initMap">

related question: Google Maps API: Load specific version

like image 199
geocodezip Avatar answered Nov 14 '22 20:11

geocodezip