From df2ef42fe48e33d97eae644a0315e7c8d2bbf3fc Mon Sep 17 00:00:00 2001 From: Andrew Kirkegaard Date: Sat, 4 May 2013 16:16:36 -0500 Subject: [PATCH] getLayer by id. --- src/layer/LayerGroup.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/layer/LayerGroup.js b/src/layer/LayerGroup.js index 17a685c7..396df1aa 100644 --- a/src/layer/LayerGroup.js +++ b/src/layer/LayerGroup.js @@ -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]); }