【问题标题】:How to disable showing cluster counts? (Gmaps4Rails)如何禁用显示集群计数? (Gmaps4Rails)
【发布时间】:2015-08-15 05:11:26
【问题描述】:

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

【问题讨论】:

    标签: gmaps4rails


    【解决方案1】:

    不修改源代码是不可能做到这一点的。 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);
    

    【讨论】:

      猜你喜欢
      • 2015-12-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多