Merge pull request #407 from ahocevar/alwaysInRange

alwaysInRange not updated when using addOptions. r=@elemoine,@bartvde
This commit is contained in:
ahocevar
2012-04-19 09:00:26 -07:00
2 changed files with 16 additions and 1 deletions

View File

@@ -338,6 +338,11 @@ OpenLayers.Layer = OpenLayers.Class({
this.metadata = {};
options = OpenLayers.Util.extend({}, options);
// make sure we respect alwaysInRange if set on the prototype
if (this.alwaysInRange != null) {
options.alwaysInRange = this.alwaysInRange;
}
this.addOptions(options);
this.name = name;
@@ -858,7 +863,7 @@ OpenLayers.Layer = OpenLayers.Class({
alwaysInRange = false;
}
}
if(this.alwaysInRange == null) {
if(this.options.alwaysInRange == null) {
this.alwaysInRange = alwaysInRange;
}