[Pkg-javascript-commits] [leaflet-markercluster] 301/479: Fix map.removeLayers(MCG) not doing anything. Thanks Driklyn. Fixes #108
Jonas Smedegaard
dr at jones.dk
Thu Oct 16 16:00:45 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 46ca075ccbdd027ff82138ca2f82543ce47b9340
Author: danzel <danzel at localhost.geek.nz>
Date: Fri Dec 21 15:01:13 2012 +1300
Fix map.removeLayers(MCG) not doing anything. Thanks Driklyn. Fixes #108
---
CHANGELOG.md | 1 +
src/MarkerClusterGroup.js | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 32a32bd..f84f44b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -19,6 +19,7 @@ Leaflet.markercluster
* IE10 Bug fix (Reported by [@theLundquist](https://github.com/theLundquist)) [#86](https://github.com/danzel/Leaflet.markercluster/issues/86)
* Fixes for hasLayer after removing a layer (Reported by [@cvisto](https://github.com/cvisto)) [#44](https://github.com/danzel/Leaflet.markercluster/issues/44)
* Fix clearLayers not unsetting __parent of the markers, preventing them from being re-added. (Reported by [@apuntovanini](https://github.com/apuntovanini)) [#99](https://github.com/danzel/Leaflet.markercluster/issues/99)
+ * Fix map.removeLayer(markerClusterGroup) not working (Reported by [@Driklyn](https://github.com/Driklyn)) [#108](https://github.com/danzel/Leaflet.markercluster/issues/108)
## 0.2 (2012-10-11)
diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index ed8d2c6..028fc0c 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -351,14 +351,14 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
this._spiderfierOnRemove();
}
- this._map = null;
-
//Clean up all the layers we added to the map
for (var i in this._layers) {
if (this._layers.hasOwnProperty(i)) {
L.FeatureGroup.prototype.removeLayer.call(this, this._layers[i]);
}
}
+
+ 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