Make getLayerStatesArray return an array of layer states
This commit is contained in:
@@ -57,15 +57,10 @@ ol.layer.Layer.prototype.getLayersArray = function(opt_array) {
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.layer.Layer.prototype.getLayerStatesArray = function(opt_obj) {
|
||||
var obj = (goog.isDef(opt_obj)) ? opt_obj : {
|
||||
layers: [],
|
||||
layerStates: []
|
||||
};
|
||||
goog.asserts.assert(obj.layers.length === obj.layerStates.length);
|
||||
obj.layers.push(this);
|
||||
obj.layerStates.push(this.getLayerState());
|
||||
return obj;
|
||||
ol.layer.Layer.prototype.getLayerStatesArray = function(opt_states) {
|
||||
var states = (goog.isDef(opt_states)) ? opt_states : [];
|
||||
states.push(this.getLayerState());
|
||||
return states;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user