Google地图API错误,页码没有变化 [英] Google Maps API Error with no changes in the page code

查看:113
本文介绍了Google地图API错误,页码没有变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天,我们的代码没有任何变化,Google地图无法正常运行,我们今天遇到了这样的错误:

  Uncaught TypeError:无法在js中读取未定义的
的属性'entries'key = api_key:102 $ j $ j $ key $ a $ key $ a $ b $ 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
搜索?v = _I0tOw3rSQ_doWiefjlY5aQCOGyEGSTSZnF3_H-NxWg1:1

Uncaught TypeError:google.maps.LatLngBounds不是构造函数
(搜索?v = _I0tOw3rSQ_doWiefjlY5aQCOGyEGSTSZnF3_H-NxWg1:1)
在ObjectD [作为init](搜索?v = _I0tOw3rSQ_doWiefjlY5aQCOGyEGSTSZnF3_H-NxWg1:1)
在HTMLDocument。< anonymous> (搜索V = _I0tOw3rSQ_doWiefjlY5aQCOGyEGSTSZnF3_H-NxWg1:1)
。在L(λjquery的V = 7Sd5PfzIDKXEDPMwZrZ0oOZN3B1M8lJMYBbJRNRKggY1:1)
。在Object.fireWith [按resolveWith](jquery的V = 7Sd5PfzIDKXEDPMwZrZ0oOZN3B1M8lJMYBbJRNRKggY1:1)
at Function.ready(jquery?v = 7Sd5PfzIDKXEDPMwZrZ0oOZN3B1M8lJMYBbJRNRKggY1:1)
at HTMLDocument.ht(jquery?v = 7Sd5PfzIDKXEDPMwZrZ0oOZN3B1M8lJMYBbJRNRKggY1:1)

我们正在像这样加载API:

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

我们没有更改页面中的任何内容,而今天当我们尝试页面时,什么都不起作用。 / p>

有什么想法? Google是否改变了昨天和今天之间的任何事情?解析方案

您正在使用API​​的实验性版本,请尝试发布版本。详情(来自文档):


当前发行版本是3.29。您可以使用以下任一引导程序请求它:




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

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

相关问题: Google Maps API:载入特定版本


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?

解决方案

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

这篇关于Google地图API错误,页码没有变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆