MarkerCluster V3停止正常工作 [英] MarkerCluster V3 stopped working properly

查看:269
本文介绍了MarkerCluster V3停止正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用从GitHub MarkerCluster_compiled.js。不过,虽然逻辑的作品,它的图形开始从昨天失败。

I am using MarkerCluster_compiled.js from github. But while the logic works, its graphics started failing from yesterday.

这个问题似乎是https://google-maps-utility-library-v3.google$c$c.com/svn\"返回404,和所有群集标记图像有这个网址的依赖。(这谷歌地图V3 SVN网址仍是谷歌的公共领域)

The problem seems to be caused by "https://google-maps-utility-library-v3.googlecode.com/svn" returns a 404, and all cluster marker images have dependency on this url. (This google map v3 svn url is still in google's public domain)

在我看来,这个特殊的404的影响是不平凡的,因为我看到人们的生活网站都受到了影响。我很惊讶这个问题会发生在谷歌。

Seems to me the impact of this particular "404" is not trivial, as I see people's live sites have been affected. I am surprised this problem could happen to Google.

例如:
该标记聚类器对github.io advanced_example不再起作用(我不能发布的链接,由于我的低信誉)。

For example: The marker-clusterer's advanced_example on github.io no longer work (I can't post the link due to my low reputation).

期待看到谷歌解决这个问题或其他任何建议。

Looking forward to see Google fix the issue or any other suggestion.

推荐答案

作为的谷歌移动源到GitHub上的而回,新的托管版本,现在可以直接使用下面的脚本的URL(标准和编译的版本)来访问:

As Google moved the source over to GitHub a while back, the new hosted versions can now be accessed directly by using the following script urls (standard and compiled versions):

https://rawgit.com/googlemaps/js-marker-clusterer/gh-pages/src/markerclusterer.js
https://rawgit.com/googlemaps/js-marker-clusterer/gh-pages/src/markerclusterer_compiled.js

您还可以实例化你的MarkerClusterer时,需要指定的ImagePath选项从GitHub上访问图像:

You'll also need to specify the imagePath option when instantiating your MarkerClusterer to access the images from GitHub:

var mc = new MarkerClusterer(map, markers, { 
    imagePath: 'https://rawgit.com/googlemaps/js-marker-clusterer/gh-pages/images/m' 
});

以下以前SO文章包含有关的ImagePath参考集群图片更多详细信息:

The following earlier SO post contains more detail regarding the imagePath reference to the cluster images:

谷歌地图不工作的https://

在生产,上面的网址(以脚本和的ImagePath)应与CDN版本取代,因为他们有无流量限制或节流和文件通过一个超快速的全球CDN服务。但是请记住,作为一个免费的服务,它提供<一个href=\"https://github.com/rgrove/rawgit/wiki/Frequently-Asked-Questions#i-need-guaranteed-100-uptime-should-i-use-cdnrawgitcom\"相对=nofollow>不正常运行或支持担保的。

In production, the above urls (to the script and the imagePath) should be replaced with the cdn versions as they have no traffic limits or throttling and the files are served via a super fast global CDN. However please bear in mind that, as a free service, it offers no uptime or support guarantees.

要做到这一点,只需用的 rawgit.com =htt​​ps://cdn.rawgit.com 相对=nofollow> cdn.rawgit.com 。

To do this, simply replace rawgit.com with cdn.rawgit.com.

这是覆盖在更详细的在下面SO回答:

This is covered in more detail in the following SO answer:

Link和执行外部在GitHub上 JavaScript文件托管

Link and execute external JavaScript file hosted on GitHub

这篇关于MarkerCluster V3停止正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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