有没有什么办法可以禁用Marker Clusterer以获得少于定义的标记计数? [英] Is there any way to disable the Marker Clusterer for less than defined marker counts?

查看:157
本文介绍了有没有什么办法可以禁用Marker Clusterer以获得少于定义的标记计数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要我的Marker Clusterer;不要将小于4的标记聚集在一起。即使对于2个标记,它也会聚集所有标记。



有没有可能的方法来设置它? 您想要的选项不适用于MarkerClusterer,但如果您使用名为以下增强功能的选项,则该选项是可选的: MarkerClustererPlus 。它基本上是原版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以获得少于定义的标记计数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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