【发布时间】:2015-08-15 05:11:26
【问题描述】:
我正在使用Google Maps for Rails,虽然我喜欢集群器,但我不想显示集群大小。有没有办法在不修改聚类器源代码的情况下禁用标记文本?
【问题讨论】:
标签: gmaps4rails
我正在使用Google Maps for Rails,虽然我喜欢集群器,但我不想显示集群大小。有没有办法在不修改聚类器源代码的情况下禁用标记文本?
【问题讨论】:
标签: gmaps4rails
不修改源代码是不可能做到这一点的。 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);
【讨论】: