我有带有 clustergroup 的传单地图,它工作正常。我想在集群组单击时打开弹出窗口。在结束标记(元素)上,onclick 弹出窗口磨损良好。
我也能够捕获集群组单击事件,但无法打开弹出窗口。
//To create cluster
this.markers = L.markerClusterGroup();
//On cluster click get all children
this.markers.on('clusterclick', function (a) {
this.getClusterData(a.layer.getAllChildMarkers());
//All children is available of cluster when clicked
},this);
但无法打开弹出窗口。