SINTEF-9012 / PruneCluster

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

RemoveMarkers won't work #128

Closed wahisoufiane closed 8 years ago

wahisoufiane commented 8 years ago

Hi,

When I call event function to remove a specific marker, with prunecluster.RemoveMarkers(marker) it doesn't remove the marker, and I have to call prunecluster.RedrawIcons() then it works!

How could it work without explicitly call the redraw function?

fungiboletus commented 8 years ago

Hi,

RemoveMarkers requires an array of marker, so maybe you need to call prunecluster.RemoveMarkers([marker]).

Also, you must call exclicitely pruneCluster.ProcessView(); I think.

wahisoufiane commented 8 years ago

I did send array of marker like you said.

I tried to call prunecluster.FitBounds() function instead of prunecluster.RedrawIcons() and it works well, also it prevent a bug of unbind label on removing marker, that redrawIcons didn't unbind.