SINTEF-9012 / PruneCluster

Fast and realtime marker clustering for Leaflet
MIT License
551 stars 131 forks source link

Error iterating over the elements #164

Closed JePedrosa closed 6 years ago

JePedrosa commented 6 years ago

Good, after iterating on a layer and activating the onclick I realized that later when I zoom on the map it is as if it were saved somewhere and when clicking on an element, it repeats what I have to do so many times As I zoomed, can anyone help me with this?

My code is as follows:

    capa.PrepareLeafletMarker = function(leafletMarker, data) {
        leafletMarker.setIcon(data.icon);
        leafletMarker.on('click', function(){
            alert("1")
                });
       });