Adding cross-browser XMLHttpRequest functionality and convenience methods around it in the OpenLayers.Request namespace. Deprecating OpenLayers.Ajax.Request. Full support sync/async requests using all HTTP verbs now. r=elemoine (closes #1565)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7335 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -32,7 +32,7 @@ OpenLayers.Tile.WFS = OpenLayers.Class(OpenLayers.Tile, {
|
||||
|
||||
/**
|
||||
* Property: request
|
||||
* {OpenLayers.Ajax.Request}
|
||||
* {<OpenLayers.Request.XMLHttpRequest>}
|
||||
*/
|
||||
request: null,
|
||||
|
||||
@@ -100,8 +100,7 @@ OpenLayers.Tile.WFS = OpenLayers.Class(OpenLayers.Tile, {
|
||||
|
||||
/**
|
||||
* Method: loadFeaturesForRegion
|
||||
* get the full request string from the ds and the tile params
|
||||
* and call the AJAX loadURL().
|
||||
* Abort any pending requests and issue another request for data.
|
||||
*
|
||||
* Input are function pointers for what to do on success and failure.
|
||||
*
|
||||
@@ -113,7 +112,12 @@ OpenLayers.Tile.WFS = OpenLayers.Class(OpenLayers.Tile, {
|
||||
if(this.request) {
|
||||
this.request.abort();
|
||||
}
|
||||
this.request = OpenLayers.loadURL(this.url, null, this, success);
|
||||
this.request = OpenLayers.Request.GET({
|
||||
url: this.url,
|
||||
success: success,
|
||||
failure: failure,
|
||||
scope: this
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -122,7 +126,7 @@ OpenLayers.Tile.WFS = OpenLayers.Class(OpenLayers.Tile, {
|
||||
* layer.addFeatures in vector mode, addResults otherwise.
|
||||
*
|
||||
* Parameters:
|
||||
* request - {XMLHttpRequest}
|
||||
* request - {<OpenLayers.Request.XMLHttpRequest>}
|
||||
*/
|
||||
requestSuccess:function(request) {
|
||||
if (this.features) {
|
||||
|
||||
Reference in New Issue
Block a user