Merge pull request #1300 from rvlasveld/add_hasLayer_to_layerGroup
Add has layer to layer group
This commit is contained in:
commit
140cace2a7
@ -40,6 +40,13 @@ L.LayerGroup = L.Class.extend({
|
||||
return this;
|
||||
},
|
||||
|
||||
hasLayer: function (layer) {
|
||||
if (!layer) { return false; }
|
||||
|
||||
var id = L.stamp(layer);
|
||||
return this._layers.hasOwnProperty(id);
|
||||
},
|
||||
|
||||
clearLayers: function () {
|
||||
this.eachLayer(this.removeLayer, this);
|
||||
return this;
|
||||
|
Loading…
Reference in New Issue
Block a user