Google地图V3呈现超过100万个标记(在合理的时间内) [英] Google Maps V3 rendering over 1 million markers (in a reasonable time)

查看:138
本文介绍了Google地图V3呈现超过100万个标记(在合理的时间内)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近使用API​​(最新版本)的V3创建了Google Map。我的一个要求是我能够渲染超过100万个标记(在合理的时间内)。合理的时间将在15秒以内。



我知道一次渲染所有100万个标记是相当疯狂的,这也是我研究性能选项的原因。我遇到并使用的其中一个选项是MarkerClusterer: https://developers.google.com/地图/文章/ toomanymarkers



然而,我现在开始看到性能问题时,用超过100,000个标记测试MarkerClusterer,因为它需要很长时间渲染地图和标记(1分钟+)。最终,我设法使页面崩溃了大约200,000个标记。



有什么方法可以在使用这些标记时提高地图的性能吗?

预先感谢

解决方案

我有类似的挑战,即在地图上显示100多万分。



使用服务器端的弹性搜索群集和客户端的传单群集。

可能会有所帮助..



演示此处



请查看此处的代码


I have recently created a Google Map using V3 of the API (latest version). One of my requirements is that I am able to render over 1 million markers (in a reasonable time). A reasonable time would be under 15 seconds.

I know that it is fairly crazy to render all 1 million markers at once which is why I have investigated performance options. One of the options I came across and utilized is the MarkerClusterer: https://developers.google.com/maps/articles/toomanymarkers

However, I am now starting to see performance issues when testing the MarkerClusterer with over 100,000 markers as it is taking a long time to render the map and markers (1 min+). Eventually, I have managed to make the page crash with around 200,000 markers.

Is there any way to improve the performance of the map when using this many markers?

Thanks in advance for any help.

解决方案

I had similar challenge of showing a million+ points on map.

Made use of elastic search clustering on server side and leaflet cluster on the client side.

May be this be helpful..

Demo here

Check the code here

这篇关于Google地图V3呈现超过100万个标记(在合理的时间内)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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