add an option to OpenLayers.Strategy.BBOX to allow not aborting previous requests

This commit is contained in:
Bart van den Eijnden
2012-02-21 07:53:43 +01:00
parent 79b539c1f9
commit 815cafd900
2 changed files with 18 additions and 7 deletions
+7 -4
View File
@@ -124,9 +124,12 @@ OpenLayers.Strategy.BBOX = OpenLayers.Class(OpenLayers.Strategy, {
* Callback function called on "moveend" or "refresh" layer events.
*
* Parameters:
* options - {Object} An object with a property named "force", this
* property references a boolean value indicating if new data
* must be incondtionally read.
* options - {Object} Optional object whose properties will determine
* the behaviour of this Strategy
*
* Valid options include:
* force - {Boolean} if true, new data must be unconditionally read.
* noAbort - {Boolean} if true, do not abort previous requests.
*/
update: function(options) {
var mapBounds = this.getMapBounds();
@@ -218,7 +221,7 @@ OpenLayers.Strategy.BBOX = OpenLayers.Class(OpenLayers.Strategy, {
* returned by the layer protocol.
*/
triggerRead: function(options) {
if (this.response) {
if (this.response && options.noAbort !== true) {
this.layer.protocol.abort(this.response);
this.layer.events.triggerEvent("loadend");
}