diff --git a/lib/OpenLayers/Tile/UTFGrid.js b/lib/OpenLayers/Tile/UTFGrid.js index 35151dba10..96a603198a 100644 --- a/lib/OpenLayers/Tile/UTFGrid.js +++ b/lib/OpenLayers/Tile/UTFGrid.js @@ -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); }, /**