问题描述
我想要我的Marker Clusterer;不要将小于4的标记聚集在一起。即使对于2个标记,它也会聚集所有标记。有没有可能的方法来设置它? 您想要的选项不适用于MarkerClusterer,但如果您使用名为以下增强功能的选项,则该选项是可选的:。它基本上是原版v2 MarkerClusterer的Google Maps v3升级,然后由Gary Little进一步增强和扩展。它的功能与原始MarkerClusterer几乎相同,但提供了更多选项。
针对您的问题,您可以将一组选项传递给MarkerClusterer构造函数使用MarkerClustererPlus)并包含一个选项: minimumClusterSize 。这会给你你想要的。
I want my Marker Clusterer; not to cluster markers less than 4 or something. It is clustering all the markers even for 2 markers.
Is there any possible way to set it?
The option you want is not available with MarkerClusterer, but it is an option if you use an an enhancement named: MarkerClustererPlus. It is essentially a Google Maps v3 upgrade of the original v2 MarkerClusterer, which was then further enhanced and extended by Gary Little. It functions pretty much the same as the original MarkerClusterer, but offers more options.
Specific to your question, you may pass a set of options to the MarkerClusterer constructor function (when using MarkerClustererPlus) and include an option: minimumClusterSize. That will give you what you want.
这篇关于有没有什么办法可以禁用Marker Clusterer以获得少于定义的标记计数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!