Add setZIndex to LayerGroup to allow LayerGroups to work better with the layers control. Fixes #1096

This commit is contained in:
danzel 2012-11-19 09:58:28 +13:00
parent d0b8ca9ef0
commit b28b6da924

View File

@ -82,6 +82,15 @@ L.LayerGroup = L.Class.extend({
method.call(context, this._layers[i]); method.call(context, this._layers[i]);
} }
} }
},
setZIndex: function(zIndex)
{
this.eachLayer(function(l) {
if (l.setZIndex) {
l.setZIndex(zIndex);
}
}, this);
} }
}); });