PruneCluster icon indicating copy to clipboard operation
PruneCluster copied to clipboard

cluster onClick event

Open NiharikaSinghal opened this issue 4 years ago • 0 comments

I want to add a different code on onClick event of the cluster. To do so i am using the explanation given in document, by overriding the BuildLeafletCluster function.

pruneCluster.BuildLeafletCluster = function(cluster, position) {
    var m = new L.Marker(position, {
         icon: pruneCluster.BuildLeafletClusterIcon(cluster)
    });
    m.on('click', function() {
        console.log("here inside this event");
    });
    return m;                         
 };

Now when i click the cluster it gets Zoom for the first time and rest other times it goes inside the event and print the message. I could not figure out this behavior?

I do not want it to Zoom in on first click

Thanks & Regards Niharika Singhal

NiharikaSinghal avatar Feb 26 '20 15:02 NiharikaSinghal