Merge pull request #8032 from romanzoller/remove-olx-typedefs-ol/source
Start removing externs for `ol/source`
This commit is contained in:
@@ -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.<string,*>,
|
||||
* projection: ol.ProjectionLike,
|
||||
* ratio: (number|undefined),
|
||||
* resolutions: (Array.<number>|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.<string,*>|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.<number>|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,
|
||||
|
||||
@@ -67,6 +67,16 @@ const ImageSourceEvent = function(type, image) {
|
||||
inherits(ImageSourceEvent, Event);
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {ol.AttributionLike} [attributions]
|
||||
* @property {module:ol/extent~Extent} [extent]
|
||||
* @property {module:ol/proj~ProjectionLike} projection
|
||||
* @property {Array.<number>} [resolutions]
|
||||
* @property {ol.source.State} [state]
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
* Abstract base class; normally only used for creating subclasses and not
|
||||
@@ -76,7 +86,7 @@ inherits(ImageSourceEvent, Event);
|
||||
* @constructor
|
||||
* @abstract
|
||||
* @extends {ol.source.Source}
|
||||
* @param {ol.SourceImageOptions} options Single image source options.
|
||||
* @param {module:ol/source/Image~Options} options Single image source options.
|
||||
* @api
|
||||
*/
|
||||
const ImageSource = function(options) {
|
||||
|
||||
@@ -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.<string,*>} 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.<number>} [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) {
|
||||
|
||||
@@ -8,6 +8,15 @@ import {get as getProjection} from '../proj.js';
|
||||
import SourceState from '../source/State.js';
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {ol.AttributionLike} [attributions]
|
||||
* @property {module:ol/proj~ProjectionLike} projection
|
||||
* @property {ol.source.State} [state]
|
||||
* @property {boolean} [wrapX]
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
* Abstract base class; normally only used for creating subclasses and not
|
||||
@@ -19,7 +28,7 @@ import SourceState from '../source/State.js';
|
||||
* @constructor
|
||||
* @abstract
|
||||
* @extends {module:ol/Object~BaseObject}
|
||||
* @param {ol.SourceSourceOptions} options Source options.
|
||||
* @param {module:ol/source/Source~Options} options Source options.
|
||||
* @api
|
||||
*/
|
||||
const Source = function(options) {
|
||||
|
||||
@@ -209,16 +209,6 @@ ol.ReprojTileFunctionType;
|
||||
ol.ReprojTriangle;
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
||||
* extent: (null|module:ol/extent~Extent|undefined),
|
||||
* projection: module:ol/proj~ProjectionLike,
|
||||
* resolutions: (Array.<number>|undefined),
|
||||
* state: (ol.source.State|undefined)}}
|
||||
*/
|
||||
ol.SourceImageOptions;
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {{revision: number,
|
||||
* resolution: number,
|
||||
@@ -227,15 +217,6 @@ ol.SourceImageOptions;
|
||||
ol.SourceRasterRenderedState;
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
||||
* projection: module:ol/proj~ProjectionLike,
|
||||
* state: (ol.source.State|undefined),
|
||||
* wrapX: (boolean|undefined)}}
|
||||
*/
|
||||
ol.SourceSourceOptions;
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
||||
* cacheSize: (number|undefined),
|
||||
|
||||
Reference in New Issue
Block a user