getLayer by id.

This commit is contained in:
Andrew Kirkegaard 2013-05-04 16:16:36 -05:00
parent 6ea5984dc6
commit df2ef42fe4

View File

@ -88,8 +88,13 @@ L.LayerGroup = L.Class.extend({
return this;
},
getLayer: function (id) {
return this._layers[id];
},
getLayers: function () {
var layers = [];
for (var i in this._layers) {
layers.push(this._layers[i]);
}