The parseData method doesn't need to know of XHR.

This commit is contained in:
Tim Schaub
2012-02-25 20:51:03 -07:00
parent 12fa9b54ef
commit 8c95a90052

View File

@@ -110,7 +110,7 @@ OpenLayers.Tile.UTFGrid = OpenLayers.Class(OpenLayers.Tile, {
this.isLoading = false;
this.events.triggerEvent("loadend");
if (response.status === 200) {
this.parseData(response);
this.parseData(response.responseText);
}
},
scope: this
@@ -125,15 +125,18 @@ OpenLayers.Tile.UTFGrid = OpenLayers.Class(OpenLayers.Tile, {
/**
* Method: parseJSON
* Parse the JSON from a request
*
* Parameters:
* str - {String} UTFGrid as a JSON string.
*
* Returns:
* {Object} parsed javascript data
*/
parseData: function(req) {
parseData: function(str) {
if (!this.format) {
this.format = new OpenLayers.Format.JSON();
}
this.json = this.format.read(req.responseText);
this.json = this.format.read(str);
},
/**