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:
@@ -109,8 +109,12 @@ OpenLayers.Layer.Text = OpenLayers.Class(OpenLayers.Layer.Markers, {
|
||||
};
|
||||
|
||||
this.events.triggerEvent("loadstart");
|
||||
OpenLayers.loadURL(this.location, null,
|
||||
this, this.parseData, onFail);
|
||||
OpenLayers.Request.GET({
|
||||
url: this.location,
|
||||
success: this.parseData,
|
||||
failure: onFail,
|
||||
scope: this
|
||||
});
|
||||
this.loaded = true;
|
||||
}
|
||||
}
|
||||
@@ -137,7 +141,7 @@ OpenLayers.Layer.Text = OpenLayers.Class(OpenLayers.Layer.Markers, {
|
||||
* Method: parseData
|
||||
*
|
||||
* Parameters:
|
||||
* ajaxRequest - {XMLHttpRequest}
|
||||
* ajaxRequest - {<OpenLayers.Request.XMLHttpRequest>}
|
||||
*/
|
||||
parseData: function(ajaxRequest) {
|
||||
var text = ajaxRequest.responseText;
|
||||
|
||||
Reference in New Issue
Block a user