Remove olx.source.RasterOptions

This commit is contained in:
Florent gravin
2018-03-28 16:28:10 +02:00
parent 4e32fd8975
commit e3889b6d11
2 changed files with 20 additions and 68 deletions

View File

@@ -507,73 +507,6 @@ olx.source.TileDebugOptions.prototype.projection;
olx.source.TileDebugOptions.prototype.tileGrid;
/**
* Whether to wrap the world horizontally. Default is `true`.
* @type {boolean|undefined}
* @api
*/
olx.source.TileDebugOptions.prototype.wrapX;
/**
* @typedef {{sources: Array.<ol.source.Source>,
* operation: (ol.RasterOperation|undefined),
* lib: (Object|undefined),
* threads: (number|undefined),
* operationType: (ol.source.RasterOperationType|undefined)}}
* @api
*/
olx.source.RasterOptions;
/**
* Input sources.
* @type {Array.<ol.source.Source>}
* @api
*/
olx.source.RasterOptions.prototype.sources;
/**
* Raster operation. The operation will be called with data from input sources
* and the output will be assigned to the raster source.
* @type {ol.RasterOperation|undefined}
* @api
*/
olx.source.RasterOptions.prototype.operation;
/**
* Functions that will be made available to operations run in a worker.
* @type {Object|undefined}
* @api
*/
olx.source.RasterOptions.prototype.lib;
/**
* By default, operations will be run in a single worker thread. To avoid using
* workers altogether, set `threads: 0`. For pixel operations, operations can
* be run in multiple worker threads. Note that there is additional overhead in
* transferring data to multiple workers, and that depending on the user's
* system, it may not be possible to parallelize the work.
* @type {number|undefined}
* @api
*/
olx.source.RasterOptions.prototype.threads;
/**
* Operation type. Supported values are `'pixel'` and `'image'`. By default,
* `'pixel'` operations are assumed, and operations will be called with an
* array of pixels from input sources. If set to `'image'`, operations will
* be called with an array of ImageData objects from input sources.
* @type {ol.source.RasterOperationType|undefined}
* @api
*/
olx.source.RasterOptions.prototype.operationType;
/**
* @typedef {{
* cacheSize: (number|undefined),

View File

@@ -82,6 +82,25 @@ const RasterSourceEvent = function(type, frameState, data) {
};
inherits(RasterSourceEvent, Event);
/**
* @typedef {Object} Options
* @property {Array.<ol.source.Source>} sources Input sources.
* @property {ol.RasterOperation} [operation] Raster operation.
* The operation will be called with data from input sources
* and the output will be assigned to the raster source.
* @property {Object} [lib] Functions that will be made available to operations run in a worker.
* @property {number} [threads] By default, operations will be run in a single worker thread.
* To avoid using workers altogether, set `threads: 0`. For pixel operations, operations can
* be run in multiple worker threads. Note that there is additional overhead in
* transferring data to multiple workers, and that depending on the user's
* system, it may not be possible to parallelize the work.
* @property {ol.source.RasterOperationType} [operationType] Operation type.
* Supported values are `'pixel'` and `'image'`. By default,
* `'pixel'` operations are assumed, and operations will be called with an
* array of pixels from input sources. If set to `'image'`, operations will
* be called with an array of ImageData objects from input sources.
*/
/**
* @classdesc
@@ -92,7 +111,7 @@ inherits(RasterSourceEvent, Event);
* @constructor
* @extends {ol.source.Image}
* @fires ol.source.Raster.Event
* @param {olx.source.RasterOptions} options Options.
* @param {module:ol/source/Raster~Options=} options Options.
* @api
*/
const RasterSource = function(options) {