Merge pull request #3214 from tschaub/raster
Pixel manipulation with raster sources.
This commit is contained in:
@@ -266,6 +266,30 @@ oli.source.ImageEvent = function() {};
|
||||
oli.source.ImageEvent.prototype.image;
|
||||
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
oli.source.RasterEvent = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @type {ol.Extent}
|
||||
*/
|
||||
oli.source.RasterEvent.prototype.extent;
|
||||
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
oli.source.RasterEvent.prototype.resolution;
|
||||
|
||||
|
||||
/**
|
||||
* @type {Object}
|
||||
*/
|
||||
oli.source.RasterEvent.prototype.data;
|
||||
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
|
||||
@@ -4501,6 +4501,65 @@ olx.source.ImageVectorOptions.prototype.source;
|
||||
olx.source.ImageVectorOptions.prototype.style;
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {{sources: Array.<ol.source.Source>,
|
||||
* operation: (ol.raster.Operation|undefined),
|
||||
* lib: (Object|undefined),
|
||||
* threads: (number|undefined),
|
||||
* operationType: (ol.raster.OperationType|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.raster.Operation|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.raster.OperationType|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.source.RasterOptions.prototype.operationType;
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
|
||||
* crossOrigin: (null|string|undefined),
|
||||
|
||||
Reference in New Issue
Block a user