Abort XMLHttpRequest on tile.destroy for WFS. The loadURL function now returns a request object. Thanks pgiraud for the fix. r=crschmidt (closes #964)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5539 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -28,6 +28,12 @@ OpenLayers.Tile.WFS = OpenLayers.Class(OpenLayers.Tile, {
|
||||
*/
|
||||
url: null,
|
||||
|
||||
/**
|
||||
* Property: request
|
||||
* {OpenLayers.Ajax.Request}
|
||||
*/
|
||||
request: null,
|
||||
|
||||
/** TBD 3.0 - reorder the parameters to the init function to put URL
|
||||
* as last, so we can continue to call tile.initialize()
|
||||
* without changing the arguments.
|
||||
@@ -57,6 +63,9 @@ OpenLayers.Tile.WFS = OpenLayers.Class(OpenLayers.Tile, {
|
||||
this.destroyAllFeatures();
|
||||
this.features = null;
|
||||
this.url = null;
|
||||
if(this.request) {
|
||||
this.request.transport.abort();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -97,7 +106,7 @@ OpenLayers.Tile.WFS = OpenLayers.Class(OpenLayers.Tile, {
|
||||
* failure - {function}
|
||||
*/
|
||||
loadFeaturesForRegion:function(success, failure) {
|
||||
OpenLayers.loadURL(this.url, null, this, success);
|
||||
this.request = OpenLayers.loadURL(this.url, null, this, success);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user