From 2762e3ea47a766727f9b073c78dfb8ebe8782a88 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Tue, 28 Aug 2007 12:01:47 +0000 Subject: [PATCH] Stop WFS layer from requesting data when layer is not in range. (Closes #685) Note that this is not a complete fix, but instead a patch for 2.5: after 2.5, this should be changed/removed when map.setCenter() is fixed. (See #937) git-svn-id: http://svn.openlayers.org/trunk/openlayers@4069 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer/WFS.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Layer/WFS.js b/lib/OpenLayers/Layer/WFS.js index 1ba635f970..ed449175e1 100644 --- a/lib/OpenLayers/Layer/WFS.js +++ b/lib/OpenLayers/Layer/WFS.js @@ -194,7 +194,8 @@ OpenLayers.Layer.WFS = OpenLayers.Class( var outOfBounds = (!firstRendering && !this.tile.bounds.containsBounds(bounds)); - if ( zoomChanged || firstRendering || (!dragging && outOfBounds) ) { + if ( (zoomChanged || firstRendering || (!dragging && outOfBounds)) + && this.inRange) { //determine new tile bounds var center = bounds.getCenterLonLat(); var tileWidth = bounds.getWidth() * this.ratio;