PruneCluster
PruneCluster copied to clipboard
cluster onClick event
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