简体   繁体   English

必应地图通过添加8000个图钉冻结了浏览器

[英]bing map freezes browser by adding 8000 pushpins

Bing map in my site freezes browser due to loading of 8000 properties(pushpins) even though I used clustering concept. 我的站点中的必应地图由于加载了8000个属性(图钉)而冻结了浏览器,即使我使用了群集概念。 Please give me a solution for this scenario.(I've used pure javascript in coding.) 请给我一个针对这种情况的解决方案。(我在编码中使用了纯JavaScript。)

This is to be expected. 这是预料之中的。 There simply is too much data. 数据太多了。 The map control on it's own can handle about 1000 pushpins before there are too many DOM elements on the page and the browser slows down. 在页面上的DOM元素过多以及浏览器速度变慢之前,地图控件本身可以处理大约1000个图钉。 Client side clustering good to about 5,000 (sometimes more depending on browser and your computer). 客户端群集的性能可以达到约5,000个(有时更多,具体取决于浏览器和您的计算机)。

You have two options, move to server side clustering which will calculate the clusters on the fly and constantly send down the cluster groups for the current map view, or When you rasterize your data (turn your data into an image). 您有两种选择,一种是移动到服务器端集群,后者将即时计算集群,然后不断发送当前地图视图的集群组,或者当您光栅化数据(将数据转换为图像)时。

I have a white paper on how to do this here . 我在这里有一份有关如何执行此操作的白皮书。

You can find the code samples here 您可以在此处找到代码示例

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM