【问题标题】:Marker Clusterer overlapping MarkerWithLabel's labelMarker Clusterer 与 MarkerWithLabel 的标签重叠
【发布时间】:2014-09-16 12:46:34
【问题描述】:

我使用 markerWithLabel 作为我的个人标记和我的集群的 markerclusterer。

当我的标记标签打开时,它的“z-index”似乎低于集群器,但我无法更改这些设置。 我在地图中看到了一些关于不同窗格的信息,但我不知道该怎么做。

这是我正在开发的网站。

我做了这个例子。 更新:http://jsfiddle.net/n5npnchp/39/

function magic() //it's where the magic happens
我增加了标签的高度只是为了显示我在说什么。 如果您单击 8 个标记集群,然后将标记悬停在“Parque Florestal”(绿色区域)附近 您可以看到黑色标签位于群集器上方..我可以更改它..

我不记得为什么这个项目使用带有标签的标记,而不是 infoWindow,在这种情况下这是最好的做法吗?

【问题讨论】:

标签: google-maps google-maps-api-3 marker markerclusterer


【解决方案1】:

我不知道这是否是最好的解决方案,但我更改了 markerwithlabel.js 文件

 //this.getPanes().overlayImage.appendChild(this.labelDiv_); THIS
  this.getPanes().overlayMouseTarget.appendChild(this.labelDiv_); //TO THIS

 //this.getPanes().overlayImage.appendChild(this.crossDiv_); AND THIS
    this.getPanes().overlayImage.appendChild(this.crossDiv_); //TO THIS

【讨论】:

    【解决方案2】:

    请查看Here

    我希望这会对你有所帮助。

    【讨论】:

      猜你喜欢
      • 2015-01-22
      • 2013-12-31
      • 1970-01-01
      • 2013-12-25
      • 1970-01-01
      • 2020-11-07
      • 2012-04-16
      • 1970-01-01
      • 2014-12-02
      相关资源
      最近更新 更多