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

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

问题描述

根据标题,有人知道为什么它每 30 秒冻结一次吗?我认为这是谷歌地图的某种计时器,但找不到任何此类参考.

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.

要重新创建,只需将完整的 html + javascript 复制到本地文件中:

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

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

打开本地 html 文件,然后移动地图,它会在 30 秒内冻结.一旦解冻,它就会正常工作,直到 30 秒过去.

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.

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

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

任何帮助将不胜感激.

推荐答案

这似乎是实验版本中的一个问题,目前是 3.20.

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

请参阅开发人员指南中的版本控制

版本控制

Google Maps API 团队将定期更新此 Javascript API,以提供新功能、错误修复和性能改进.所有 API 更改都将向后兼容,确保如果您使用当前记录的接口启动应用程序,该应用程序将在 API 更新时继续工作而无需修改.(注意:实验性 API 参考中记录的实验性功能不在此保证范围内.实验性功能将在 API 文档中明确标记.)

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.)

版本类型

您可以使用 Maps Javascript API 引导程序请求的 v 参数指定要在应用程序中加载的 API 版本.支持三个选项:

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:

  • 实验版本,指定为 v=3.exp.
  • 发布版本,指定为 v=3 或 v=3.19.
  • 编号版本,指定为 v=3.18.
  • 如果您没有明确指定版本,默认情况下您将收到实验版本.指定客户端 ID 的 Google Maps API for Work 客户将默认收到发布版本.
  • 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.

实验版

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

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天全站免登陆