diff --git a/externs/olx.js b/externs/olx.js index fa20fd9235..b8662f75f9 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -49,55 +49,6 @@ olx.render.State.prototype.resolution; olx.render.State.prototype.rotation; -/** - * @typedef {{preemptive: (boolean|undefined), - * jsonp: (boolean|undefined), - * tileJSON: (TileJSON|undefined), - * url: (string|undefined)}} - */ -olx.source.TileUTFGridOptions; - - -/** - * Use JSONP with callback to load the TileJSON. Useful when the server - * does not support CORS. Default is `false`. - * @type {boolean|undefined} - * @api - */ -olx.source.TileUTFGridOptions.prototype.jsonp; - - -/** - * If `true` the TileUTFGrid source loads the tiles based on their "visibility". - * This improves the speed of response, but increases traffic. - * Note that if set to `false`, you need to pass `true` as `opt_request` - * to the `forDataAtCoordinateAndResolution` method otherwise no data - * will ever be loaded. - * Default is `true`. - * @type {boolean|undefined} - * @api - */ -olx.source.TileUTFGridOptions.prototype.preemptive; - - -/** - * TileJSON configuration for this source. If not provided, `url` must be - * configured. - * @type {TileJSON|undefined} - * @api - */ -olx.source.TileUTFGridOptions.prototype.tileJSON; - - -/** - * TileJSON endpoint that provides the configuration for this source. Request - * will be made through JSONP. If not provided, `tileJSON` must be configured. - * @type {string|undefined} - * @api - */ -olx.source.TileUTFGridOptions.prototype.url; - - /** * @typedef {{cacheSize: (number|undefined), * layer: string, diff --git a/src/ol/source/TileUTFGrid.js b/src/ol/source/TileUTFGrid.js index b13c6d4300..e0c07a17da 100644 --- a/src/ol/source/TileUTFGrid.js +++ b/src/ol/source/TileUTFGrid.js @@ -249,13 +249,30 @@ CustomTile.prototype.load = function() { }; +/** + * @typedef {Object} Options + * @property {boolean} [preemptive=true] + * If `true` the TileUTFGrid source loads the tiles based on their "visibility". + * This improves the speed of response, but increases traffic. + * Note that if set to `false`, you need to pass `true` as `opt_request` + * to the `forDataAtCoordinateAndResolution` method otherwise no data + * will ever be loaded. + * @property {boolean} [jsonp=false] Use JSONP with callback to load the TileJSON. + * Useful when the server does not support CORS.. + * @property {tileJSON} [tileJSON] TileJSON configuration for this source. + * If not provided, `url` must be configured. + * @property {string} [url] TileJSON endpoint that provides the configuration for this source. + * Request will be made through JSONP. If not provided, `tileJSON` must be configured. + */ + + /** * @classdesc * Layer source for UTFGrid interaction data loaded from TileJSON format. * * @constructor * @extends {ol.source.Tile} - * @param {olx.source.TileUTFGridOptions} options Source options. + * @param {module:ol/source/TileUTFGrid~Options=} options Source options. * @api */ const UTFGrid = function(options) {