removeLayer works now. addLayer still needs fixing to be clustering aware

This commit is contained in:
danzel
2012-07-20 11:49:40 +12:00
parent 603e985d58
commit 003fceab14
+4
View File
@@ -119,6 +119,10 @@ L.MarkerCluster = L.Marker.extend({
//Check our children
for (i = markers.length - 1; i >= 0; i--) {
if (markers[i] == layer) {
if (markers[i]._icon) {
L.FeatureGroup.prototype.removeLayer.call(group, markers[i]);
}
markers.splice(i, 1);
this._recalculateBounds();