Move olx.source.ImageWMSOptions to ol/source/ImageWMSOptions
This commit is contained in:
105
externs/olx.js
105
externs/olx.js
@@ -665,111 +665,6 @@ olx.source.RasterOptions.prototype.threads;
|
|||||||
olx.source.RasterOptions.prototype.operationType;
|
olx.source.RasterOptions.prototype.operationType;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
|
||||||
* crossOrigin: (null|string|undefined),
|
|
||||||
* hidpi: (boolean|undefined),
|
|
||||||
* serverType: (ol.source.WMSServerType|string|undefined),
|
|
||||||
* imageLoadFunction: (ol.ImageLoadFunctionType|undefined),
|
|
||||||
* params: Object.<string,*>,
|
|
||||||
* projection: ol.ProjectionLike,
|
|
||||||
* ratio: (number|undefined),
|
|
||||||
* resolutions: (Array.<number>|undefined),
|
|
||||||
* url: (string|undefined)}}
|
|
||||||
*/
|
|
||||||
olx.source.ImageWMSOptions;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Attributions.
|
|
||||||
* @type {ol.AttributionLike|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.ImageWMSOptions.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.ImageWMSOptions.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.ImageWMSOptions.prototype.hidpi;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The type of the remote WMS server: `mapserver`, `geoserver` or `qgis`. Only
|
|
||||||
* needed if `hidpi` is `true`. Default is `undefined`.
|
|
||||||
* @type {ol.source.WMSServerType|string|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.ImageWMSOptions.prototype.serverType;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Optional function to load an image given a URL.
|
|
||||||
* @type {ol.ImageLoadFunctionType|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.ImageWMSOptions.prototype.imageLoadFunction;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* WMS request parameters. At least a `LAYERS` param is required. `STYLES` is
|
|
||||||
* `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX`
|
|
||||||
* and `CRS` (`SRS` for WMS version < 1.3.0) will be set dynamically.
|
|
||||||
* @type {Object.<string,*>}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.ImageWMSOptions.prototype.params;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Projection.
|
|
||||||
* @type {ol.ProjectionLike}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.ImageWMSOptions.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.5`.
|
|
||||||
* @type {number|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.ImageWMSOptions.prototype.ratio;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Resolutions. If specified, requests will be made for these resolutions only.
|
|
||||||
* @type {Array.<number>|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.ImageWMSOptions.prototype.resolutions;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* WMS service URL.
|
|
||||||
* @type {string|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.ImageWMSOptions.prototype.url;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {{
|
* @typedef {{
|
||||||
* cacheSize: (number|undefined),
|
* cacheSize: (number|undefined),
|
||||||
|
|||||||
@@ -17,6 +17,32 @@ import WMSServerType from '../source/WMSServerType.js';
|
|||||||
import {compareVersions} from '../string.js';
|
import {compareVersions} from '../string.js';
|
||||||
import {appendParams} from '../uri.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.source.WMSServerType|string} [serverType=undefined] The type of
|
||||||
|
* the remote WMS server: `mapserver`, `geoserver` or `qgis`. Only needed if `hidpi` is `true`.
|
||||||
|
* @property {ol.ImageLoadFunctionType} [imageLoadFunction] Optional function to load an image given a URL.
|
||||||
|
* @property {Object.<string,*>} params WMS request parameters.
|
||||||
|
* At least a `LAYERS` param is required. `STYLES` is
|
||||||
|
* `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX`
|
||||||
|
* and `CRS` (`SRS` for WMS version < 1.3.0) will be set dynamically.
|
||||||
|
* @property {ol.ProjectionLike} projection Projection.
|
||||||
|
* @property {number} [ratio=1.5] 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.<number>} [resolutions] Resolutions.
|
||||||
|
* If specified, requests will be made for these resolutions only.
|
||||||
|
* @property {string} url WMS service URL.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Source for WMS servers providing single, untiled images.
|
* Source for WMS servers providing single, untiled images.
|
||||||
@@ -24,7 +50,7 @@ import {appendParams} from '../uri.js';
|
|||||||
* @constructor
|
* @constructor
|
||||||
* @fires ol.source.Image.Event
|
* @fires ol.source.Image.Event
|
||||||
* @extends {ol.source.Image}
|
* @extends {ol.source.Image}
|
||||||
* @param {olx.source.ImageWMSOptions=} opt_options Options.
|
* @param {module:ol/source/ImageWMS~Options=} [opt_options] ImageWMS options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
const ImageWMS = function(opt_options) {
|
const ImageWMS = function(opt_options) {
|
||||||
|
|||||||
Reference in New Issue
Block a user