diff --git a/externs/olx.js b/externs/olx.js index 16bddc6b9b..f1762651a0 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -903,105 +903,6 @@ olx.source.OSMOptions.prototype.url; olx.source.OSMOptions.prototype.wrapX; -/** - * @typedef {{attributions: (ol.AttributionLike|undefined), - * crossOrigin: (null|string|undefined), - * hidpi: (boolean|undefined), - * imageLoadFunction: (ol.ImageLoadFunctionType|undefined), - * params: Object., - * projection: ol.ProjectionLike, - * ratio: (number|undefined), - * resolutions: (Array.|undefined), - * url: (string|undefined)}} - */ -olx.source.ImageArcGISRestOptions; - - -/** - * Attributions. - * @type {ol.AttributionLike|undefined} - * @api - */ -olx.source.ImageArcGISRestOptions.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.ImageArcGISRestOptions.prototype.crossOrigin; - - -/** - * Use the `ol.Map#pixelRatio` value when requesting the image from the remote - * server. Default is `true`. - * @type {boolean|undefined} - * @api - */ -olx.source.ImageArcGISRestOptions.prototype.hidpi; - - -/** - * Optional function to load an image given a URL. - * @type {ol.ImageLoadFunctionType|undefined} - * @api - */ -olx.source.ImageArcGISRestOptions.prototype.imageLoadFunction; - - -/** - * ArcGIS Rest parameters. This field is optional. Service defaults will be - * used for any fields not specified. `FORMAT` is `PNG32` by default. `F` is `IMAGE` by - * default. `TRANSPARENT` is `true` by default. `BBOX, `SIZE`, `BBOXSR`, - * and `IMAGESR` will be set dynamically. Set `LAYERS` to - * override the default service layer visibility. See - * {@link http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Map/02r3000000v7000000/} - * for further reference. - * @type {Object.|undefined} - * @api - */ -olx.source.ImageArcGISRestOptions.prototype.params; - - -/** - * Projection. - * @type {ol.ProjectionLike} - * @api - */ -olx.source.ImageArcGISRestOptions.prototype.projection; - - -/** - * Ratio. `1` means image requests are the size of the map viewport, `2` means - * twice the size of the map viewport, and so on. Default is `1.5`. - * @type {number|undefined} - * @api - */ -olx.source.ImageArcGISRestOptions.prototype.ratio; - - -/** - * Resolutions. If specified, requests will be made for these resolutions only. - * @type {Array.|undefined} - * @api - */ -olx.source.ImageArcGISRestOptions.prototype.resolutions; - - -/** - * ArcGIS Rest service URL for a Map Service or Image Service. The - * url should include /MapServer or /ImageServer. - * @type {string|undefined} - * @api - */ -olx.source.ImageArcGISRestOptions.prototype.url; - - /** * @typedef {{attributions: (ol.AttributionLike|undefined), * canvasFunction: ol.CanvasFunctionType, diff --git a/src/ol/source/ImageArcGISRest.js b/src/ol/source/ImageArcGISRest.js index 812d1607ae..4747f4f332 100644 --- a/src/ol/source/ImageArcGISRest.js +++ b/src/ol/source/ImageArcGISRest.js @@ -11,6 +11,34 @@ import {assign} from '../obj.js'; import ImageSource, {defaultImageLoadFunction} from '../source/Image.js'; import {appendParams} from '../uri.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 {boolean} [hidpi=true] Use the `ol.Map#pixelRatio` value when requesting the image from + * the remote server. + * @property {ol.ImageLoadFunctionType} [imageLoadFunction] Optional function to load an image given + * a URL. + * @property {Object.} params ArcGIS Rest parameters. This field is optional. Service + * defaults will be used for any fields not specified. `FORMAT` is `PNG32` by default. `F` is + * `IMAGE` by default. `TRANSPARENT` is `true` by default. `BBOX, `SIZE`, `BBOXSR`, and `IMAGESR` + * will be set dynamically. Set `LAYERS` to override the default service layer visibility. See + * {@link http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Map/02r3000000v7000000/} + * for further reference. + * @property {module:ol/proj~ProjectionLike} projection Projection. + * @property {number} [ratio=1.5] Ratio. `1` means image requests are the size of the map viewport, + * `2` means twice the size of the map viewport, and so on. + * @property {Array.} [resolutions] Resolutions. If specified, requests will be made for + * these resolutions only. + * @property {string} [url] ArcGIS Rest service URL for a Map Service or Image Service. The url + * should include /MapServer or /ImageServer. + */ + + /** * @classdesc * Source for data from ArcGIS Rest services providing single, untiled images. @@ -23,7 +51,7 @@ import {appendParams} from '../uri.js'; * @constructor * @fires ol.source.Image.Event * @extends {ol.source.Image} - * @param {olx.source.ImageArcGISRestOptions=} opt_options Image ArcGIS Rest Options. + * @param {module:ol/source/ImageArcGISRest~Options=} opt_options Image ArcGIS Rest Options. * @api */ const ImageArcGISRest = function(opt_options) {