diff --git a/externs/olx.js b/externs/olx.js index 568a8cf13b..b2f385e474 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -863,80 +863,6 @@ olx.source.StamenOptions.prototype.url; olx.source.StamenOptions.prototype.wrapX; -/** - * @typedef {{attributions: (ol.AttributionLike|undefined), - * crossOrigin: (null|string|undefined), - * imageExtent: (ol.Extent), - * imageLoadFunction: (ol.ImageLoadFunctionType|undefined), - * imageSize: (ol.Size|undefined), - * projection: ol.ProjectionLike, - * url: string}} - */ -olx.source.ImageStaticOptions; - - -/** - * Attributions. - * @type {ol.AttributionLike|undefined} - * @api - */ -olx.source.ImageStaticOptions.prototype.attributions; - - -/** - * 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.ImageStaticOptions.prototype.crossOrigin; - - -/** - * Extent of the image in map coordinates. This is the [left, bottom, right, - * top] map coordinates of your image. - * @type {ol.Extent} - * @api - */ -olx.source.ImageStaticOptions.prototype.imageExtent; - - -/** - * Optional function to load an image given a URL. - * @type {ol.ImageLoadFunctionType|undefined} - * @api - */ -olx.source.ImageStaticOptions.prototype.imageLoadFunction; - - -/** - * Projection. - * @type {ol.ProjectionLike} - * @api - */ -olx.source.ImageStaticOptions.prototype.projection; - - -/** - * Size of the image in pixels. Usually the image size is auto-detected, so this - * only needs to be set if auto-detection fails for some reason. - * @type {ol.Size|undefined} - * @api - */ -olx.source.ImageStaticOptions.prototype.imageSize; - - -/** - * Image URL. - * @type {string} - * @api - */ -olx.source.ImageStaticOptions.prototype.url; - - /** * @typedef {{attributions: (ol.AttributionLike|undefined), * cacheSize: (number|undefined), diff --git a/src/ol/source/ImageStatic.js b/src/ol/source/ImageStatic.js index 088acdbab6..de12dd33d9 100644 --- a/src/ol/source/ImageStatic.js +++ b/src/ol/source/ImageStatic.js @@ -11,13 +11,30 @@ import {intersects, getHeight, getWidth} from '../extent.js'; import {get as getProjection} from '../proj.js'; import ImageSource, {defaultImageLoadFunction} from '../source/Image.js'; +/** + * @typedef {Object} Options + * @property {ol.AttributionLike} [attributions] Attributions. + * @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.Extent} [imageExtent] Extent of the image in map coordinates. + * This is the [left, bottom, right, top] map coordinates of your image. + * @property {ol.ImageLoadFunctionType} [imageLoadFunction] Optional function to load an image given a URL. + * @property {ol.ProjectionLike} projection Projection. + * @property {ol.Size} [imageSize] Size of the image in pixels. Usually the image size is auto-detected, so this + * only needs to be set if auto-detection fails for some reason. + * @property {string} url Image URL. + */ + + /** * @classdesc * A layer source for displaying a single, static image. * * @constructor * @extends {ol.source.Image} - * @param {olx.source.ImageStaticOptions} options Options. + * @param {module:ol/source/ImageStatic~Options=} options ImageStatic options. * @api */ const Static = function(options) {