Google Maps JSv3每30秒冻结数秒 [英] Google Maps JSv3 Freezes for a few seconds every 30 seconds

查看:97
本文介绍了Google Maps JSv3每30秒冻结数秒的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据标题,有谁知道它为什么每30秒冻结一次?
我认为这是Google Maps的某种计时器,但无法找到任何此类参考。





$ b

https://developers.google.com/maps/documentation/javascript/examples/map-simple



打开本地html文件,然后移动地图并在30秒内冻结。一旦它解冻,它可以正常工作,直到30秒。



似乎只发生在IE(我使用版本11)。请注意,它不会冻结在上面的Google示例页面中。



任何帮助将不胜感激。

解决



请参阅

.com / maps / documentation / javascript / basics#Versioningrel =nofollow> versioning in the Developer's Guide
$ b


版本控制



Google Maps API小组会定期更新此Javascript API,并增加新功能,错误修正和性能改进。所有API更改都将向后兼容,确保如果您使用当前记录的界面启动应用程序,则该应用程序将在API更新时继续工作而不做任何修改。 (注意:实验性API参考文件中记录的实验性功能不在本保证范围内,实验性功能将在API文档中清楚地标出。)



版本类型



您可以通过使用Maps JavaScript API引导请求的v参数指定应用程序在应用程序中加载哪个版本的API 。支持三种选项:


  • 实验版本,用v = 3.exp指定。

  • 发布版本,用v = 3或v = 3.19指定。

  • 编号版本,用v = 3.18指定。您没有明确指定版本,默认情况下您会收到实验版本。默认情况下,指定客户端ID的Google Maps API for Work客户将收到发布版本。

  • ul>

    实验版



    实验版 - 目前为3.20 - 包含最新功能和错误修复,因为它们公开可用。对实验版本所做的更改不保证功能稳定。我们鼓励您定期使用实验版本测试您的应用程序,您可以通过在加载Maps API时添加v = 3.20来执行此操作。如果你喜欢生活在边缘,你可以添加v = 3.exp来始终接收当前带有所有最新功能的实验版本。



As per title, does anyone know why it freezes every 30 seconds? I figured that it was some sort of timer with Google Maps but cant find any such reference.

To recreate, simply copy into a local file the full html + javascript from:

https://developers.google.com/maps/documentation/javascript/examples/map-simple

Open the local html file and then just move the map around and it will freeze within 30 seconds. Once it unfreezes, it works fine until 30 seconds have elapsed.

Seems to only happen in IE (i used version 11). Note that it doesnt freeze within the Google example page above.

Any help would be appreciated.

解决方案

This appears to be an issue in the experimental version, currently 3.20.

See versioning in the Developer's Guide

Versioning

The Google Maps API team will regularly update this Javascript API with new features, bug fixes, and performance improvements. All API changes will be backwards-compatible, ensuring that if you launch an application using the currently documented interfaces, that application will continue to work without modification as the API is updated. (Note: experimental features, documented in the Experimental API Reference are not covered by this guarantee. Features that are experimental will be clearly labeled in the API documentation.)

Types of Versions

You can indicate which version of the API to load within your application by specifying it using the v parameter of the Maps Javascript API bootstrap request. Three options are supported:

  • The experimental version, specified with v=3.exp.
  • The release version, specified with v=3 or v=3.19.
  • A numbered version, specified with v=3.18.
  • If you do not explicitly specify a version, you will receive the experimental version by default. Google Maps API for Work customers who specify a client ID will receive the release version by default.

The experimental version

The experimental version — currently 3.20 — contains the latest features and bug fixes as they are made publicly available. Changes made to the experimental version are not guaranteed to be feature stable. We encourage you to regularly test your applications with the experimental version, which you can do by adding v=3.20 when loading the Maps API. If you like to live on the edge, you can add v=3.exp to always receive the current experimental version with all of its latest features.

这篇关于Google Maps JSv3每30秒冻结数秒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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