diff --git a/externs/olx.js b/externs/olx.js index 506596fd03..29caa4202a 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -49,129 +49,6 @@ olx.render.State.prototype.resolution; olx.render.State.prototype.rotation; -/** - * @typedef {{attributions: (ol.AttributionLike|undefined), - * cacheSize: (number|undefined), - * crossOrigin: (null|string|undefined), - * projection: (ol.ProjectionLike|undefined), - * reprojectionErrorThreshold: (number|undefined), - * url: !string, - * tierSizeCalculation: (string|undefined), - * size: ol.Size, - * extent: (ol.Extent|undefined), - * transition: (number|undefined), - * tileSize: (number|undefined)}} - */ -olx.source.ZoomifyOptions; - - -/** - * Attributions. - * @type {ol.AttributionLike|undefined} - * @api - */ -olx.source.ZoomifyOptions.prototype.attributions; - - -/** - * Cache size. Default is `2048`. - * @type {number|undefined} - * @api - */ -olx.source.ZoomifyOptions.prototype.cacheSize; - - -/** - * The `crossOrigin` attribute for loaded images. Note that you must provide a - * `crossOrigin` value if you are using the WebGL renderer or if you want to - * access pixel data with the Canvas renderer. See - * {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image} - * for more detail. - * @type {null|string|undefined} - * @api - */ -olx.source.ZoomifyOptions.prototype.crossOrigin; - - -/** - * Projection. - * @type {ol.ProjectionLike|undefined} - * @api - */ -olx.source.ZoomifyOptions.prototype.projection; - - -/** - * Maximum allowed reprojection error (in pixels). Default is `0.5`. - * Higher values can increase reprojection performance, but decrease precision. - * @type {number|undefined} - * @api - */ -olx.source.ZoomifyOptions.prototype.reprojectionErrorThreshold; - - -/** - * URL template or base URL of the Zoomify service. A base URL is the fixed part - * of the URL, excluding the tile group, z, x, and y folder structure, e.g. - * `http://my.zoomify.info/IMAGE.TIF/`. A URL template must include - * `{TileGroup}`, `{x}`, `{y}`, and `{z}` placeholders, e.g. - * `http://my.zoomify.info/IMAGE.TIF/{TileGroup}/{z}-{x}-{y}.jpg`. - * Internet Imaging Protocol (IIP) with JTL extension can be also used with - * `{tileIndex}` and `{z}` placeholders, e.g. - * `http://my.zoomify.info?FIF=IMAGE.TIF&JTL={z},{tileIndex}`. - * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be - * used instead of defining each one separately in the `urls` option. - * @type {!string} - * @api - */ -olx.source.ZoomifyOptions.prototype.url; - - -/** - * Tier size calculation method: `default` or `truncated`. - * @type {string|undefined} - * @api - */ -olx.source.ZoomifyOptions.prototype.tierSizeCalculation; - - -/** - * Size of the image. - * @type {ol.Size} - * @api - */ -olx.source.ZoomifyOptions.prototype.size; - - -/** - * Extent for the TileGrid that is created. Default sets the TileGrid in the - * fourth quadrant, meaning extent is `[0, -height, width, 0]`. To change the - * extent to the first quadrant (the default for OpenLayers 2) set the extent - * as `[0, 0, width, height]`. - * @type {ol.Extent|undefined} - * @api - */ -olx.source.ZoomifyOptions.prototype.extent; - - -/** - * Duration of the opacity transition for rendering. To disable the opacity - * transition, pass `transition: 0`. - * @type {number|undefined} - * @api - */ -olx.source.ZoomifyOptions.prototype.transition; - - -/** - * Tile size. Same tile size is used for all zoom levels. Default value is - * `256`. - * @type {number|undefined} - * @api - */ -olx.source.ZoomifyOptions.prototype.tileSize; - - /** * @typedef {{fill: (module:ol/style/Fill~Fill|undefined), * radius: number, diff --git a/src/ol/source/Zoomify.js b/src/ol/source/Zoomify.js index 0f4cb01845..29184f42e5 100644 --- a/src/ol/source/Zoomify.js +++ b/src/ol/source/Zoomify.js @@ -79,6 +79,41 @@ CustomTile.prototype.getImage = function() { }; +/** + * @typedef {Object} Options + * @property {ol.AttributionLike} [attributions] Attributions. + * @property {number} [cacheSize=2048] Cache size. + * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that + * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to + * access pixel data with the Canvas renderer. See + * {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image} for more detail. + * @property {ol.ProjectionLike} [projection] Projection. + * @property {boolean} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels). + * Higher values can increase reprojection performance, but decrease precision. + * @property {string} [url] URL template or base URL of the Zoomify service. + * A base URL is the fixed part + * of the URL, excluding the tile group, z, x, and y folder structure, e.g. + * `http://my.zoomify.info/IMAGE.TIF/`. A URL template must include + * `{TileGroup}`, `{x}`, `{y}`, and `{z}` placeholders, e.g. + * `http://my.zoomify.info/IMAGE.TIF/{TileGroup}/{z}-{x}-{y}.jpg`. + * Internet Imaging Protocol (IIP) with JTL extension can be also used with + * `{tileIndex}` and `{z}` placeholders, e.g. + * `http://my.zoomify.info?FIF=IMAGE.TIF&JTL={z},{tileIndex}`. + * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be + * used instead of defining each one separately in the `urls` option. + * @property {string} [tierSizeCalculation] Tier size calculation method: `default` or `truncated`. + * @property {ol.Size} [size] Size of the image. + * @property {ol.Extent} [extent] Extent for the TileGrid that is created. + * Default sets the TileGrid in the + * fourth quadrant, meaning extent is `[0, -height, width, 0]`. To change the + * extent to the first quadrant (the default for OpenLayers 2) set the extent + * as `[0, 0, width, height]`. + * @property {number} [transition] Duration of the opacity transition for rendering. + * To disable the opacity transition, pass `transition: 0`. + * @property {number} [tileSize=256] Tile size. Same tile size is used for all zoom levels. + */ + + /** * @classdesc * Layer source for tile data in Zoomify format (both Zoomify and Internet @@ -86,7 +121,7 @@ CustomTile.prototype.getImage = function() { * * @constructor * @extends {ol.source.TileImage} - * @param {olx.source.ZoomifyOptions=} opt_options Options. + * @param {module:ol/source/Zoomify~Options=} opt_options Options. * @api */ const Zoomify = function(opt_options) {