BBOX strategy should not request data if its layer is out of range when changing layer visibility
This commit is contained in:
@@ -87,7 +87,7 @@ OpenLayers.Strategy.BBOX = OpenLayers.Class(OpenLayers.Strategy, {
|
||||
"refresh": this.update,
|
||||
scope: this
|
||||
});
|
||||
if(this.layer.visibility === true && this.layer.inRange === true) {
|
||||
if(this.layer.visibility === true) {
|
||||
this.update();
|
||||
} else {
|
||||
this.layer.events.on({
|
||||
@@ -134,7 +134,7 @@ OpenLayers.Strategy.BBOX = OpenLayers.Class(OpenLayers.Strategy, {
|
||||
update: function(options) {
|
||||
var mapBounds = this.getMapBounds();
|
||||
if (mapBounds !== null && ((options && options.force) ||
|
||||
this.invalidBounds(mapBounds))) {
|
||||
(this.layer.calculateInRange() && this.invalidBounds(mapBounds)))) {
|
||||
this.calculateBounds(mapBounds);
|
||||
this.resolution = this.layer.map.getResolution();
|
||||
this.triggerRead(options);
|
||||
|
||||
Reference in New Issue
Block a user