Leaflet.markercluster icon indicating copy to clipboard operation
Leaflet.markercluster copied to clipboard

Event spiderfied not fire

Open josuelmm opened this issue 1 year ago • 0 comments

  • Leaflet version I'm using: 1.8.0
  • Leaflet.MarkerCluster version I'm using: 1.5.3
  • Browser (with version) I'm using: Chrome
  • OS/Platform (with version) I'm using: Windows

I am importing this:

import * as L from 'leaflet';
import 'leaflet.markercluster';
import 'leaflet.markercluster.freezable';

this.markersGroup = L.markerClusterGroup({
      chunkedLoading: true,
      disableClusteringAtZoom: 15,
      spiderfyOnMaxZoom: !1,
      showCoverageOnHover: !1,
      removeOutsideVisibleBounds: !0,
      iconCreateFunction: (t) => {
        var e = t.getChildCount(),
            i = "cluster-";
        return (i += e < 5 ? "small" : e < 10 ? "medium" : "large"), L.divIcon({ html: '<div class="cluster-inner"><b>' + e + "</b></div>", className: "cluster " + i, iconSize: [58, 58], iconAnchor: [25, 25] });
      },
    });

this.markersGroup.addTo(this.map);
        this.markersGroup.on('spiderfied', (cluster, cMarkers) => {
          console.log(cluster);
          console.log(cMarkers);
        });
        this.markersGroup.on('clusterclick', (a) => {
          this.markersGroup.refreshClusters();
          // a.layer is actually a cluster
          console.log('cluster ' + a.layer.getAllChildMarkers().length);
        });

The events spiderfied and unspiderfied not fire The event cluster click yes fire

josuelmm avatar Aug 02 '22 15:08 josuelmm