From 5064f6e8fc8472f0deb74c376312bb5782b2d532 Mon Sep 17 00:00:00 2001 From: danzel Date: Thu, 11 Oct 2012 10:45:02 +1300 Subject: [PATCH] Update readme with notes on removing layers. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 45ab38e94..1e6d287b2 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,8 @@ addLayer, removeLayer and clearLayers are supported and they should work for mos ### Bulk adding and removing Markers addLayers and removeLayers are bulk methods for adding and removing markers and should be favoured over the single versions when doing bulk addition/removal of markers. Each takes an array of markers +If you are removing a lot of markers it will almost definitely be better to call clearLayers then call addLayers to add the markers you don't want to remove back in. See [#59](https://github.com/danzel/Leaflet.markercluster/issues/59#issuecomment-9320628) for details. + ### Other Methods ```` hasLayer(layer): Returns true if the given layer (marker) is in the MarkerClusterGroup