Added addLayers() method to Map class; also, added tests to support it.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@55 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Schuyler Erle
2006-05-16 19:16:02 +00:00
parent 1b00201377
commit 58b202b359
2 changed files with 29 additions and 1 deletions
+12
View File
@@ -114,6 +114,18 @@ OpenLayers.Map.prototype = {
this.layers.push(layer);
},
/**
* @param {Array(OpenLayers.Layer)} layers
*/
addLayers: function (layers) {
for (var i = 0; i < layers.length; i++) {
this.addLayer(layers[i]);
}
},
/**
* @param {OpenLayers.Control} control
*/
addControl: function (control) {
control.map = this;
this.controls.push(control);