diff --git a/externs/olx.js b/externs/olx.js index c72e9765c0..568a8cf13b 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -427,104 +427,6 @@ olx.source.VectorTileOptions.prototype.wrapX; olx.source.VectorTileOptions.prototype.transition; -/** - * @typedef {{url: (string|undefined), - * displayDpi: (number|undefined), - * metersPerUnit: (number|undefined), - * hidpi: (boolean|undefined), - * useOverlay: (boolean|undefined), - * projection: ol.ProjectionLike, - * ratio: (number|undefined), - * resolutions: (Array.|undefined), - * imageLoadFunction: (ol.ImageLoadFunctionType|undefined), - * params: (Object|undefined)}} - */ -olx.source.ImageMapGuideOptions; - - -/** - * The mapagent url. - * @type {string|undefined} - * @api - */ -olx.source.ImageMapGuideOptions.prototype.url; - - -/** - * The display resolution. Default is `96`. - * @type {number|undefined} - * @api - */ -olx.source.ImageMapGuideOptions.prototype.displayDpi; - - -/** - * The meters-per-unit value. Default is `1`. - * @type {number|undefined} - * @api - */ -olx.source.ImageMapGuideOptions.prototype.metersPerUnit; - - -/** - * Use the `ol.Map#pixelRatio` value when requesting the image from the remote - * server. Default is `true`. - * @type {boolean|undefined} - * @api - */ -olx.source.ImageMapGuideOptions.prototype.hidpi; - - -/** - * If `true`, will use `GETDYNAMICMAPOVERLAYIMAGE`. - * @type {boolean|undefined} - * @api - */ -olx.source.ImageMapGuideOptions.prototype.useOverlay; - - -/** - * Projection. - * @type {ol.ProjectionLike} - * @api - */ -olx.source.ImageMapGuideOptions.prototype.projection; - - -/** - * Ratio. `1` means image requests are the size of the map viewport, `2` means - * twice the width and height of the map viewport, and so on. Must be `1` or - * higher. Default is `1`. - * @type {number|undefined} - * @api - */ -olx.source.ImageMapGuideOptions.prototype.ratio; - - -/** - * Resolutions. If specified, requests will be made for these resolutions only. - * @type {Array.|undefined} - * @api - */ -olx.source.ImageMapGuideOptions.prototype.resolutions; - - -/** - * Optional function to load an image given a URL. - * @type {ol.ImageLoadFunctionType|undefined} - * @api - */ -olx.source.ImageMapGuideOptions.prototype.imageLoadFunction; - - -/** - * Additional parameters. - * @type {Object|undefined} - * @api - */ -olx.source.ImageMapGuideOptions.prototype.params; - - /** * @typedef {{cacheSize: (number|undefined), * layer: string, diff --git a/src/ol/source/ImageMapGuide.js b/src/ol/source/ImageMapGuide.js index fb59f00210..10cc47155c 100644 --- a/src/ol/source/ImageMapGuide.js +++ b/src/ol/source/ImageMapGuide.js @@ -10,6 +10,24 @@ import {assign} from '../obj.js'; import ImageSource, {defaultImageLoadFunction} from '../source/Image.js'; import {appendParams} from '../uri.js'; +/** + * @typedef {Object} Options + * @property {string} [url] The mapagent url. + * @property {number} [displayDpi=96] The display resolution. + * @property {number} [metersPerUnit=1] The meters-per-unit value. + * @property {boolean} [hidpi=true] Use the `ol.Map#pixelRatio` value when requesting + * the image from the remote server. + * @property {boolean} [useOverlay] If `true`, will use `GETDYNAMICMAPOVERLAYIMAGE`. + * @property {ol.ProjectionLike} projection Projection. + * @property {number} [ratio=1] Ratio. `1` means image requests are the size of the map viewport, `2` means + * twice the width and height of the map viewport, and so on. Must be `1` or higher. + * @property {Array.} [resolutions] Resolutions. + * If specified, requests will be made for these resolutions only. + * @property {ol.ImageLoadFunctionType} [imageLoadFunction] Optional function to load an image given a URL. + * @property {Object} [params] Additional parameters. + */ + + /** * @classdesc * Source for images from Mapguide servers @@ -17,7 +35,7 @@ import {appendParams} from '../uri.js'; * @constructor * @fires ol.source.Image.Event * @extends {ol.source.Image} - * @param {olx.source.ImageMapGuideOptions} options Options. + * @param {module:ol/source/ImageMapGuide~Options=} options ImageMapGuide options. * @api */ const ImageMapGuide = function(options) {