Move olx.source.ImageMapGuideOptions to ol/source/ImageMapGuideOptions

This commit is contained in:
Florent gravin
2018-03-28 15:46:28 +02:00
parent 3d90a4587c
commit db600287f8
2 changed files with 19 additions and 99 deletions

View File

@@ -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.<number>|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.<number>|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,

View File

@@ -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.<number>} [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) {