Javascript 标记群集器加上单击删除群集

Javascript 标记群集器加上单击删除群集,javascript,google-maps-api-3,markerclusterer,markerspiderfier,Javascript,Google Maps Api 3,Markerclusterer,Markerspiderfier,我正在使用这个工具 对于精确位置或非常接近的聚类标记(gridSize:5) 我想做的是在单击并使用spiderfy标记时删除一个集群(不是所有集群,只是一个集群) 这能做到吗 在Marker clusterer的引用中,我没有找到任何删除特定集群的函数/方法 Thx提前。我会使用自己版本的MarkerClustererPlus,只需稍加修改: //@150 of MarkerClustererPlus: modify to send cClusterIcon.div_ on the cli

我正在使用这个工具

对于精确位置或非常接近的聚类标记(
gridSize:5

我想做的是在单击并使用spiderfy标记时删除一个集群(不是所有集群,只是一个集群)

这能做到吗

在Marker clusterer的引用中,我没有找到任何删除特定集群的函数/方法


Thx提前。

我会使用自己版本的MarkerClustererPlus,只需稍加修改:

//@150 of MarkerClustererPlus: modify to send cClusterIcon.div_ on the click event
google.maps.event.trigger(mc, "click", cClusterIcon.cluster_, cClusterIcon.div_);
在您的代码中,可以这样使用它:

google.maps.event.addListener(markerCluster, 'click', function (cluster, clusterIcon) {
    clusterIcon.remove();
    //Do the other stuff with the markers ...
    var markers = cluster.getMarkers();
});

在MarkerClustererPlus的第150行附近抱歉,找到了,我在错误的文件中查找(MarkerClusterer,不是MarkerClustererPlus)。我现在就来试试。好的,这很有效(删除/隐藏图标),但是如何显示/where/are clusteredcluster.getMarkers();使用cluster.getMarkers(),我从该集群中获取标记,但它们并没有显示在地图上,并且我无法对它们触发click事件(这会触发spiderfy)。