[Pkg-javascript-commits] [leaflet-markercluster] 406/479: Clear our internal cluster layer when we are removed from the map so those layers aren't there when we are re-added. Fixes #211

Jonas Smedegaard dr at jones.dk
Thu Oct 16 16:01:01 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository leaflet-markercluster.

commit 63e43e430f1e6948d88b7ce79b9caf2dbe4b2262
Author: danzel <danzel at localhost.geek.nz>
Date:   Fri Jul 5 12:03:20 2013 +1200

    Clear our internal cluster layer when we are removed from the map so those layers aren't there when we are re-added. Fixes #211
---
 src/MarkerClusterGroup.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index cc5a1b8..ac3f51d 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -443,6 +443,8 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 		this._featureGroup.onRemove(map);
 		this._nonPointGroup.onRemove(map);
 
+		this._featureGroup.clearLayers();
+
 		this._map = null;
 	},
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet-markercluster.git



More information about the Pkg-javascript-commits mailing list