Skip to content

Commit

Permalink
Fix(#11): Merge pull request #12 from computerminds/bug/remove-layers…
Browse files Browse the repository at this point in the history
…-markercluster

Remove layers by layer object, not id
  • Loading branch information
ghybs authored Mar 15, 2017
2 parents dc13f03 + 02ab369 commit a79e380
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/subgroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ L.FeatureGroup.SubGroup = L.FeatureGroup.extend({

if (this._map && this._layers[id]) {
// Remove from parent group instead of directly from map.
this._parentGroup.removeLayer(id);
this._parentGroup.removeLayer(this._layers[id]);
}

delete this._layers[id];
Expand Down

0 comments on commit a79e380

Please sign in to comment.