我使用的是Google Maps for Rails,虽然我喜欢这个集群器,但我不想显示集群大小。有没有办法在不修改集群器源代码的情况下禁用标记文本?
发布于 2015-08-21 08:45:22
如果不修改源代码,就不可能做到这一点。Open the source code并搜索innerHTML,然后再往下看几行,看下面这一行,这显然不具备替代行为的能力:
"'>" + this.sums_.text + "</div>";Apparently some folks found this codebase's source control system (SVN) inadequate和they forked it to GitHub。后来,他们添加了功能,包括the ability to hide the label via the following method
setHideLabel(true)使用Google Maps for Rails,执行以下操作:
handler.clusterer.serviceObject.setHideLabel(true);https://stackoverflow.com/questions/32021751
复制相似问题