Cleanup use of Script protocol.
I would think there would still be an error thrown here. Will put together a test to determine for sure, but I'd think that the default GeoJSON parser used by the protocol would choke on the UTFGrid json.
This commit is contained in:
@@ -82,14 +82,12 @@ OpenLayers.Tile.UTFGrid = OpenLayers.Class(OpenLayers.Tile, {
|
||||
this.url = this.layer.getURL(this.bounds);
|
||||
|
||||
if (this.layer.useJSONP) {
|
||||
// Use JSONP method to avoid xbrowser polucy
|
||||
var that = this;
|
||||
var cback = function(resp) {
|
||||
that.json = resp.data;
|
||||
};
|
||||
// Use JSONP method to avoid xbrowser policy
|
||||
var ols = new OpenLayers.Protocol.Script({
|
||||
url: this.url,
|
||||
callback: cback,
|
||||
callback: function(response) {
|
||||
this.json = response.data;
|
||||
},
|
||||
scope: this
|
||||
});
|
||||
ols.read();
|
||||
|
||||
Reference in New Issue
Block a user