Allow array for min/maxExtent in layers.
This commit is contained in:
@@ -471,6 +471,16 @@ OpenLayers.Layer = OpenLayers.Class({
|
||||
if (this.options == null) {
|
||||
this.options = {};
|
||||
}
|
||||
|
||||
// allow array for extents
|
||||
if (newOptions) {
|
||||
if (newOptions.maxExtent && !(newOptions.maxExtent instanceof OpenLayers.Bounds)) {
|
||||
newOptions.maxExtent = new OpenLayers.Bounds(newOptions.maxExtent);
|
||||
}
|
||||
if (newOptions.minExtent && !(newOptions.minExtent instanceof OpenLayers.Bounds)) {
|
||||
newOptions.minExtent = new OpenLayers.Bounds(newOptions.minExtent);
|
||||
}
|
||||
}
|
||||
|
||||
// update our copy for clone
|
||||
OpenLayers.Util.extend(this.options, newOptions);
|
||||
|
||||
Reference in New Issue
Block a user