Add tileJSON option to ol.source.TileUTFGrid
This commit is contained in:
@@ -49,7 +49,13 @@ ol.source.TileUTFGrid = function(options) {
|
||||
*/
|
||||
this.template_ = undefined;
|
||||
|
||||
ol.net.jsonp(options.url, this.handleTileJSONResponse.bind(this));
|
||||
if (options.url) {
|
||||
ol.net.jsonp(options.url, this.handleTileJSONResponse.bind(this));
|
||||
} else if (options.tileJSON) {
|
||||
this.handleTileJSONResponse(options.tileJSON);
|
||||
} else {
|
||||
goog.asserts.fail('Either url or tileJSON options must be provided');
|
||||
}
|
||||
};
|
||||
goog.inherits(ol.source.TileUTFGrid, ol.source.Tile);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user