如何禁用显示群集计数? (Gmaps4Rails)

时间:2015-08-15 05:11:26

标签: gmaps4rails

我正在使用Google Maps for Rails,虽然我喜欢群集,但我不想显示群集大小。有没有办法在不修改群集器源代码的情况下禁用标记文本?

1 个答案:

答案 0 :(得分:0)

如果不修改源代码,就无法做到这一点。 Open the source code并搜索innerHTML,然后在下一行中查看几行,这显然无法替代行为:

"'>" + this.sums_.text + "</div>";

Apparently some folks found this codebase's source control system (SVN) inadequate,他们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);