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:
@@ -45,10 +45,16 @@ OpenLayers.nullHandler = function(request) {
|
||||
* uri - {String} URI of source doc
|
||||
* params - {String} Params on get (doesnt seem to work)
|
||||
* caller - {Object} object which gets callbacks
|
||||
* onComplete - {Function} callback for success
|
||||
* onFailure - {Function} callback for failure
|
||||
* onComplete - {Function} Optional callback for success. The callback
|
||||
* will be called with this set to caller and will receive the request
|
||||
* object as an argument.
|
||||
* onFailure - {Function} Optional callback for failure. In the event of
|
||||
* a failure, the callback will be called with this set to caller and will
|
||||
* receive the request object as an argument.
|
||||
*
|
||||
* Both callbacks optional (though silly)
|
||||
* Returns:
|
||||
* {OpenLayers.Ajax.Request} The request object. To abort loading, call
|
||||
* request.transport.abort();
|
||||
*/
|
||||
OpenLayers.loadURL = function(uri, params, caller,
|
||||
onComplete, onFailure) {
|
||||
@@ -64,13 +70,15 @@ OpenLayers.loadURL = function(uri, params, caller,
|
||||
: OpenLayers.nullHandler;
|
||||
|
||||
// from prototype.js
|
||||
new OpenLayers.Ajax.Request(uri,
|
||||
{ method: 'get',
|
||||
parameters: params,
|
||||
onComplete: success,
|
||||
onFailure: failure
|
||||
}
|
||||
);
|
||||
return new OpenLayers.Ajax.Request(
|
||||
uri,
|
||||
{
|
||||
method: 'get',
|
||||
parameters: params,
|
||||
onComplete: success,
|
||||
onFailure: failure
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user