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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user