From 628978f8944a4ac6addf59748bcc0dcdefb903e9 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 16 Oct 2012 13:06:43 +0100 Subject: [PATCH] Clear the bounds in Protocol.BBOX when a load fails If a load fails then we won't have any features, but we also won't try and load them again for any part of that area because the bounds tell us we have already loaded them. So clear the bounds in order that reloads will be triggered. --- lib/OpenLayers/Strategy/BBOX.js | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/lib/OpenLayers/Strategy/BBOX.js b/lib/OpenLayers/Strategy/BBOX.js index 3ea357050a..88b4c6e95f 100644 --- a/lib/OpenLayers/Strategy/BBOX.js +++ b/lib/OpenLayers/Strategy/BBOX.js @@ -262,20 +262,24 @@ OpenLayers.Strategy.BBOX = OpenLayers.Class(OpenLayers.Strategy, { */ merge: function(resp) { this.layer.destroyFeatures(); - var features = resp.features; - if(features && features.length > 0) { - var remote = this.layer.projection; - var local = this.layer.map.getProjectionObject(); - if(!local.equals(remote)) { - var geom; - for(var i=0, len=features.length; i 0) { + var remote = this.layer.projection; + var local = this.layer.map.getProjectionObject(); + if(!local.equals(remote)) { + var geom; + for(var i=0, len=features.length; i