Merge pull request #8087 from pfirpfel/move-misc-typedefs

Move various typedefs out of typdefs.js
This commit is contained in:
Frédéric Junod
2018-04-19 16:56:49 +02:00
committed by GitHub
23 changed files with 109 additions and 114 deletions
+26 -8
View File
@@ -67,6 +67,24 @@ import {createElementNS, isDocument, isNode, makeArrayPusher, makeChildAppender,
*/ */
/**
* Number of features; bounds/extent.
* @typedef {Object} FeatureCollectionMetadata
* @property {number} numberOfFeatures
* @property {module:ol/extent~Extent} bounds
*/
/**
* Total deleted; total inserted; total updated; array of insert ids.
* @typedef {Object} TransactionResponse
* @property {number} totalDeleted
* @property {number} totalInserted
* @property {number} totalUpdated
* @property {Array.<string>} insertIds
*/
/** /**
* @type {string} * @type {string}
*/ */
@@ -215,7 +233,7 @@ WFS.prototype.readFeaturesFromNode = function(node, opt_options) {
* Read transaction response of the source. * Read transaction response of the source.
* *
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @return {ol.WFSTransactionResponse|undefined} Transaction response. * @return {module:ol/format/WFS~TransactionResponse|undefined} Transaction response.
* @api * @api
*/ */
WFS.prototype.readTransactionResponse = function(source) { WFS.prototype.readTransactionResponse = function(source) {
@@ -237,7 +255,7 @@ WFS.prototype.readTransactionResponse = function(source) {
* Read feature collection metadata of the source. * Read feature collection metadata of the source.
* *
* @param {Document|Node|Object|string} source Source. * @param {Document|Node|Object|string} source Source.
* @return {ol.WFSFeatureCollectionMetadata|undefined} * @return {module:ol/format/WFS~FeatureCollectionMetadata|undefined}
* FeatureCollection metadata. * FeatureCollection metadata.
* @api * @api
*/ */
@@ -259,7 +277,7 @@ WFS.prototype.readFeatureCollectionMetadata = function(source) {
/** /**
* @param {Document} doc Document. * @param {Document} doc Document.
* @return {ol.WFSFeatureCollectionMetadata|undefined} * @return {module:ol/format/WFS~FeatureCollectionMetadata|undefined}
* FeatureCollection metadata. * FeatureCollection metadata.
*/ */
WFS.prototype.readFeatureCollectionMetadataFromDocument = function(doc) { WFS.prototype.readFeatureCollectionMetadataFromDocument = function(doc) {
@@ -286,7 +304,7 @@ const FEATURE_COLLECTION_PARSERS = {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @return {ol.WFSFeatureCollectionMetadata|undefined} * @return {module:ol/format/WFS~FeatureCollectionMetadata|undefined}
* FeatureCollection metadata. * FeatureCollection metadata.
*/ */
WFS.prototype.readFeatureCollectionMetadataFromNode = function(node) { WFS.prototype.readFeatureCollectionMetadataFromNode = function(node) {
@@ -295,7 +313,7 @@ WFS.prototype.readFeatureCollectionMetadataFromNode = function(node) {
node.getAttribute('numberOfFeatures')); node.getAttribute('numberOfFeatures'));
result['numberOfFeatures'] = value; result['numberOfFeatures'] = value;
return pushParseAndPop( return pushParseAndPop(
/** @type {ol.WFSFeatureCollectionMetadata} */ (result), /** @type {module:ol/format/WFS~FeatureCollectionMetadata} */ (result),
FEATURE_COLLECTION_PARSERS, node, [], this.gmlFormat_); FEATURE_COLLECTION_PARSERS, node, [], this.gmlFormat_);
}; };
@@ -384,7 +402,7 @@ const TRANSACTION_RESPONSE_PARSERS = {
/** /**
* @param {Document} doc Document. * @param {Document} doc Document.
* @return {ol.WFSTransactionResponse|undefined} Transaction response. * @return {module:ol/format/WFS~TransactionResponse|undefined} Transaction response.
*/ */
WFS.prototype.readTransactionResponseFromDocument = function(doc) { WFS.prototype.readTransactionResponseFromDocument = function(doc) {
for (let n = doc.firstChild; n; n = n.nextSibling) { for (let n = doc.firstChild; n; n = n.nextSibling) {
@@ -398,11 +416,11 @@ WFS.prototype.readTransactionResponseFromDocument = function(doc) {
/** /**
* @param {Node} node Node. * @param {Node} node Node.
* @return {ol.WFSTransactionResponse|undefined} Transaction response. * @return {module:ol/format/WFS~TransactionResponse|undefined} Transaction response.
*/ */
WFS.prototype.readTransactionResponseFromNode = function(node) { WFS.prototype.readTransactionResponseFromNode = function(node) {
return pushParseAndPop( return pushParseAndPop(
/** @type {ol.WFSTransactionResponse} */({}), /** @type {module:ol/format/WFS~TransactionResponse} */({}),
TRANSACTION_RESPONSE_PARSERS, node, []); TRANSACTION_RESPONSE_PARSERS, node, []);
}; };
+1 -1
View File
@@ -8,7 +8,7 @@ import XYZ from '../source/XYZ.js';
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {ol.AttributionLike} [attributions] Attributions. * @property {module:ol/source/Source~AttributionLike} [attributions] Attributions.
* @property {number} [cacheSize=2048] Cache size. * @property {number} [cacheSize=2048] Cache size.
* @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that * @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 * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to
+1 -1
View File
@@ -14,7 +14,7 @@ import VectorSource from '../source/Vector.js';
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {ol.AttributionLike} [attributions] Attributions. * @property {module:ol/source/Source~AttributionLike} [attributions] Attributions.
* @property {number} [distance=20] Minimum distance in pixels between clusters. * @property {number} [distance=20] Minimum distance in pixels between clusters.
* @property {module:ol/extent~Extent} [extent] Extent. * @property {module:ol/extent~Extent} [extent] Extent.
* @property {ol.format.Feature} [format] Format. * @property {ol.format.Feature} [format] Format.
+1 -1
View File
@@ -69,7 +69,7 @@ inherits(ImageSourceEvent, Event);
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {ol.AttributionLike} [attributions] * @property {module:ol/source/Source~AttributionLike} [attributions]
* @property {module:ol/extent~Extent} [extent] * @property {module:ol/extent~Extent} [extent]
* @property {module:ol/proj~ProjectionLike} projection * @property {module:ol/proj~ProjectionLike} projection
* @property {Array.<number>} [resolutions] * @property {Array.<number>} [resolutions]
+1 -1
View File
@@ -14,7 +14,7 @@ import {appendParams} from '../uri.js';
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {ol.AttributionLike} [attributions] Attributions. * @property {module:ol/source/Source~AttributionLike} [attributions] Attributions.
* @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that * @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 * 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 * access pixel data with the Canvas renderer. See
+1 -1
View File
@@ -8,7 +8,7 @@ import ImageSource from '../source/Image.js';
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {ol.AttributionLike} [attributions] Attributions. * @property {module:ol/source/Source~AttributionLike} [attributions] Attributions.
* @property {ol.CanvasFunctionType} [canvasFunction] Canvas function. * @property {ol.CanvasFunctionType} [canvasFunction] Canvas function.
* The function returning the canvas element used by the source * The function returning the canvas element used by the source
* as an image. The arguments passed to the function are: `{module:ol/extent~Extent}` the * as an image. The arguments passed to the function are: `{module:ol/extent~Extent}` the
+1 -1
View File
@@ -13,7 +13,7 @@ import ImageSource, {defaultImageLoadFunction} from '../source/Image.js';
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {ol.AttributionLike} [attributions] Attributions. * @property {module:ol/source/Source~AttributionLike} [attributions] Attributions.
* @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that * @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 * 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 * access pixel data with the Canvas renderer. See
+1 -1
View File
@@ -19,7 +19,7 @@ import {appendParams} from '../uri.js';
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {ol.AttributionLike} [attributions] Attributions. * @property {module:ol/source/Source~AttributionLike} [attributions] Attributions.
* @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that * @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 * 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 * access pixel data with the Canvas renderer. See
+1 -1
View File
@@ -19,7 +19,7 @@ export const ATTRIBUTION = '&copy; ' +
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {ol.AttributionLike} [attributions] Attributions. * @property {module:ol/source/Source~AttributionLike} [attributions] Attributions.
* @property {number} [cacheSize=2048] Cache size. * @property {number} [cacheSize=2048] Cache size.
* @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that * @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 * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to
+22 -3
View File
@@ -22,6 +22,25 @@ import TileSource from '../source/Tile.js';
import {create as createTransform} from '../transform.js'; import {create as createTransform} from '../transform.js';
/**
* A function that takes an array of input data, performs some operation, and
* returns an array of output data.
* For `pixel` type operations, the function will be called with an array of
* pixels, where each pixel is an array of four numbers (`[r, g, b, a]`) in the
* range of 0 - 255. It should return a single pixel array.
* For `'image'` type operations, functions will be called with an array of
* {@link ImageData https://developer.mozilla.org/en-US/docs/Web/API/ImageData}
* and should return a single {@link ImageData
* https://developer.mozilla.org/en-US/docs/Web/API/ImageData}. The operations
* are called with a second "data" argument, which can be used for storage. The
* data object is accessible from raster events, where it can be initialized in
* "beforeoperations" and accessed again in "afteroperations".
*
* @typedef {function((Array.<Array.<number>>|Array.<ImageData>), Object):
* (Array.<number>|ImageData)} Operation
*/
/** /**
* @enum {string} * @enum {string}
*/ */
@@ -85,7 +104,7 @@ inherits(RasterSourceEvent, Event);
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {Array.<module:ol/source/Source~Source>} sources Input sources. * @property {Array.<module:ol/source/Source~Source>} sources Input sources.
* @property {ol.RasterOperation} [operation] Raster operation. * @property {module:ol/source/Raster~Operation} [operation] Raster operation.
* The operation will be called with data from input sources * The operation will be called with data from input sources
* and the output will be assigned to the raster source. * 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 {Object} [lib] Functions that will be made available to operations run in a worker.
@@ -105,7 +124,7 @@ inherits(RasterSourceEvent, Event);
/** /**
* @classdesc * @classdesc
* A source that transforms data from any number of input sources using an * A source that transforms data from any number of input sources using an
* {@link ol.RasterOperation} function to transform input pixel values into * {@link module:ol/source/Raster~Operation} function to transform input pixel values into
* output pixel values. * output pixel values.
* *
* @constructor * @constructor
@@ -222,7 +241,7 @@ inherits(RasterSource, ImageSource);
/** /**
* Set the operation. * Set the operation.
* @param {ol.RasterOperation} operation New operation. * @param {module:ol/source/Raster~Operation} operation New operation.
* @param {Object=} opt_lib Functions that will be available to operations run * @param {Object=} opt_lib Functions that will be available to operations run
* in a worker. * in a worker.
* @api * @api
+27 -7
View File
@@ -8,9 +8,29 @@ import {get as getProjection} from '../proj.js';
import SourceState from '../source/State.js'; import SourceState from '../source/State.js';
/**
* A function that returns a string or an array of strings representing source
* attributions.
*
* @typedef {function(module:ol/PluggableMap~FrameState): (string|Array.<string>)} Attribution
*/
/**
* A type that can be used to provide attribution information for data sources.
*
* It represents either
* * a simple string (e.g. `'© Acme Inc.'`)
* * an array of simple strings (e.g. `['© Acme Inc.', '© Bacme Inc.']`)
* * a function that returns a string or array of strings (`{@link module:ol/source/Source~Attribution}`)
*
* @typedef {string|Array.<string>|module:ol/source/Source~Attribution} AttributionLike
*/
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {ol.AttributionLike} [attributions] * @property {module:ol/source/Source~AttributionLike} [attributions]
* @property {module:ol/proj~ProjectionLike} projection * @property {module:ol/proj~ProjectionLike} projection
* @property {module:ol/source/State~State} [state] * @property {module:ol/source/State~State} [state]
* @property {boolean} [wrapX] * @property {boolean} [wrapX]
@@ -43,7 +63,7 @@ const Source = function(options) {
/** /**
* @private * @private
* @type {?ol.Attribution} * @type {?module:ol/source/Source~Attribution}
*/ */
this.attributions_ = this.adaptAttributions_(options.attributions); this.attributions_ = this.adaptAttributions_(options.attributions);
@@ -66,8 +86,8 @@ inherits(Source, BaseObject);
/** /**
* Turns the attributions option into an attributions function. * Turns the attributions option into an attributions function.
* @param {ol.AttributionLike|undefined} attributionLike The attribution option. * @param {module:ol/source/Source~AttributionLike|undefined} attributionLike The attribution option.
* @return {?ol.Attribution} An attribution function (or null). * @return {?module:ol/source/Source~Attribution} An attribution function (or null).
*/ */
Source.prototype.adaptAttributions_ = function(attributionLike) { Source.prototype.adaptAttributions_ = function(attributionLike) {
if (!attributionLike) { if (!attributionLike) {
@@ -104,7 +124,7 @@ Source.prototype.forEachFeatureAtCoordinate = UNDEFINED;
/** /**
* Get the attribution function for the source. * Get the attribution function for the source.
* @return {?ol.Attribution} Attribution function. * @return {?module:ol/source/Source~Attribution} Attribution function.
*/ */
Source.prototype.getAttributions = function() { Source.prototype.getAttributions = function() {
return this.attributions_; return this.attributions_;
@@ -157,8 +177,8 @@ Source.prototype.refresh = function() {
/** /**
* Set the attributions of the source. * Set the attributions of the source.
* @param {ol.AttributionLike|undefined} attributions Attributions. * @param {module:ol/source/Source~AttributionLike|undefined} attributions Attributions.
* Can be passed as `string`, `Array<string>`, `{@link ol.Attribution}`, * Can be passed as `string`, `Array<string>`, `{@link module:ol/source/Source~Attribution}`,
* or `undefined`. * or `undefined`.
* @api * @api
*/ */
+1 -1
View File
@@ -14,7 +14,7 @@ import {wrapX, getForProjection as getTileGridForProjection} from '../tilegrid.j
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {ol.AttributionLike} [attributions] * @property {module:ol/source/Source~AttributionLike} [attributions]
* @property {number} [cacheSize] * @property {number} [cacheSize]
* @property {module:ol/extent~Extent} [extent] * @property {module:ol/extent~Extent} [extent]
* @property {boolean} [opaque] * @property {boolean} [opaque]
+1 -1
View File
@@ -16,7 +16,7 @@ import {getForProjection as getTileGridForProjection} from '../tilegrid.js';
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {ol.AttributionLike} [attributions] Attributions. * @property {module:ol/source/Source~AttributionLike} [attributions] Attributions.
* @property {number} [cacheSize=2048] Cache size. * @property {number} [cacheSize=2048] Cache size.
* @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that * @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 * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to
+1 -1
View File
@@ -19,7 +19,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {ol.AttributionLike} [attributions] Attributions. * @property {module:ol/source/Source~AttributionLike} [attributions] Attributions.
* @property {number} [cacheSize=2048] Cache size. * @property {number} [cacheSize=2048] Cache size.
* @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that * @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 * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to
+1 -1
View File
@@ -19,7 +19,7 @@ import {appendParams} from '../uri.js';
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {ol.AttributionLike} [attributions] Attributions. * @property {module:ol/source/Source~AttributionLike} [attributions] Attributions.
* @property {number} [cacheSize=2048] Cache size. * @property {number} [cacheSize=2048] Cache size.
* @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that * @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 * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to
+1 -1
View File
@@ -10,7 +10,7 @@ import {getKeyZXY} from '../tilecoord.js';
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {ol.AttributionLike} [attributions] * @property {module:ol/source/Source~AttributionLike} [attributions]
* @property {number} [cacheSize] * @property {number} [cacheSize]
* @property {module:ol/extent~Extent} [extent] * @property {module:ol/extent~Extent} [extent]
* @property {boolean} [opaque] * @property {boolean} [opaque]
+1 -1
View File
@@ -50,7 +50,7 @@ inherits(VectorSourceEvent, Event);
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {ol.AttributionLike} [attributions] Attributions. * @property {module:ol/source/Source~AttributionLike} [attributions] Attributions.
* @property {Array.<module:ol/Feature~Feature>|ol.Collection.<module:ol/Feature~Feature>} [features] * @property {Array.<module:ol/Feature~Feature>|ol.Collection.<module:ol/Feature~Feature>} [features]
* Features. If provided as {@link ol.Collection}, the features in the source * Features. If provided as {@link ol.Collection}, the features in the source
* and the collection will stay in sync. * and the collection will stay in sync.
+1 -1
View File
@@ -12,7 +12,7 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid.
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {ol.AttributionLike} [attributions] Attributions. * @property {module:ol/source/Source~AttributionLike} [attributions] Attributions.
* @property {number} [cacheSize=128] Cache size. * @property {number} [cacheSize=128] Cache size.
* @property {module:ol/format/Feature~FeatureFormat} [format] Feature format for tiles. Used and required by the default. * @property {module:ol/format/Feature~FeatureFormat} [format] Feature format for tiles. Used and required by the default.
* @property {boolean} [overlaps=true] This source may have overlapping geometries. Setting this * @property {boolean} [overlaps=true] This source may have overlapping geometries. Setting this
+1 -1
View File
@@ -14,7 +14,7 @@ import {appendParams} from '../uri.js';
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {ol.AttributionLike} [attributions] Attributions. * @property {module:ol/source/Source~AttributionLike} [attributions] Attributions.
* @property {number} [cacheSize=2048] Cache size. * @property {number} [cacheSize=2048] Cache size.
* @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that * @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 * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to
+1 -1
View File
@@ -7,7 +7,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {ol.AttributionLike} [attributions] Attributions. * @property {module:ol/source/Source~AttributionLike} [attributions] Attributions.
* @property {number} [cacheSize=2048] Cache size. * @property {number} [cacheSize=2048] Cache size.
* @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that * @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 * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to
+1 -1
View File
@@ -81,7 +81,7 @@ CustomTile.prototype.getImage = function() {
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {ol.AttributionLike} [attributions] Attributions. * @property {module:ol/source/Source~AttributionLike} [attributions] Attributions.
* @property {number} [cacheSize=2048] Cache size. * @property {number} [cacheSize=2048] Cache size.
* @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that * @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 * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to
+16 -4
View File
@@ -33,6 +33,18 @@ import ImageStyle from '../style/Image.js';
*/ */
/**
* @typedef {Object} RenderOptions
* @property {module:ol/colorlike~ColorLike} [strokeStyle]
* @property {number} strokeWidth
* @property {number} size
* @property {string} lineCap
* @property {Array.<number>} lineDash
* @property {string} lineJoin
* @property {number} miterLimit
*/
/** /**
* @classdesc * @classdesc
* Set regular shape style for vector features. The resulting shape will be * Set regular shape style for vector features. The resulting shape will be
@@ -378,7 +390,7 @@ RegularShape.prototype.render_ = function(atlasManager) {
let size = 2 * (this.radius_ + strokeWidth) + 1; let size = 2 * (this.radius_ + strokeWidth) + 1;
/** @type {ol.RegularShapeRenderOptions} */ /** @type {module:ol/style/RegularShape~RenderOptions} */
const renderOptions = { const renderOptions = {
strokeStyle: strokeStyle, strokeStyle: strokeStyle,
strokeWidth: strokeWidth, strokeWidth: strokeWidth,
@@ -441,7 +453,7 @@ RegularShape.prototype.render_ = function(atlasManager) {
/** /**
* @private * @private
* @param {ol.RegularShapeRenderOptions} renderOptions Render options. * @param {module:ol/style/RegularShape~RenderOptions} renderOptions Render options.
* @param {CanvasRenderingContext2D} context The rendering context. * @param {CanvasRenderingContext2D} context The rendering context.
* @param {number} x The origin for the symbol (x). * @param {number} x The origin for the symbol (x).
* @param {number} y The origin for the symbol (y). * @param {number} y The origin for the symbol (y).
@@ -502,7 +514,7 @@ RegularShape.prototype.draw_ = function(renderOptions, context, x, y) {
/** /**
* @private * @private
* @param {ol.RegularShapeRenderOptions} renderOptions Render options. * @param {module:ol/style/RegularShape~RenderOptions} renderOptions Render options.
*/ */
RegularShape.prototype.createHitDetectionCanvas_ = function(renderOptions) { RegularShape.prototype.createHitDetectionCanvas_ = function(renderOptions) {
this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size]; this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];
@@ -522,7 +534,7 @@ RegularShape.prototype.createHitDetectionCanvas_ = function(renderOptions) {
/** /**
* @private * @private
* @param {ol.RegularShapeRenderOptions} renderOptions Render options. * @param {module:ol/style/RegularShape~RenderOptions} renderOptions Render options.
* @param {CanvasRenderingContext2D} context The context. * @param {CanvasRenderingContext2D} context The context.
* @param {number} x The origin for the symbol (x). * @param {number} x The origin for the symbol (x).
* @param {number} y The origin for the symbol (y). * @param {number} y The origin for the symbol (y).
-74
View File
@@ -21,28 +21,6 @@ const ol = {};
*/ */
/**
* A type that can be used to provide attribution information for data sources.
*
* It represents either
* * a simple string (e.g. `'© Acme Inc.'`)
* * an array of simple strings (e.g. `['© Acme Inc.', '© Bacme Inc.']`)
* * a function that returns a string or array of strings (`{@link ol.Attribution}`)
*
* @typedef {string|Array.<string>|ol.Attribution}
*/
ol.AttributionLike;
/**
* A function that returns a string or an array of strings representing source
* attributions.
*
* @typedef {function(olx.FrameState): (string|Array.<string>)}
*/
ol.Attribution;
/** /**
* @typedef {{fillStyle: module:ol/colorlike~ColorLike}} * @typedef {{fillStyle: module:ol/colorlike~ColorLike}}
*/ */
@@ -128,55 +106,3 @@ ol.DeclutterGroup;
* @typedef {function(module:ol/extent~Extent, number): Array.<module:ol/extent~Extent>} * @typedef {function(module:ol/extent~Extent, number): Array.<module:ol/extent~Extent>}
*/ */
ol.LoadingStrategy; ol.LoadingStrategy;
/**
* A function that takes an array of input data, performs some operation, and
* returns an array of output data.
* For `pixel` type operations, the function will be called with an array of
* pixels, where each pixel is an array of four numbers (`[r, g, b, a]`) in the
* range of 0 - 255. It should return a single pixel array.
* For `'image'` type operations, functions will be called with an array of
* {@link ImageData https://developer.mozilla.org/en-US/docs/Web/API/ImageData}
* and should return a single {@link ImageData
* https://developer.mozilla.org/en-US/docs/Web/API/ImageData}. The operations
* are called with a second "data" argument, which can be used for storage. The
* data object is accessible from raster events, where it can be initialized in
* "beforeoperations" and accessed again in "afteroperations".
*
* @typedef {function((Array.<Array.<number>>|Array.<ImageData>), Object):
* (Array.<number>|ImageData)}
*/
ol.RasterOperation;
/**
* @typedef {{
* strokeStyle: (module:ol/colorlike~ColorLike|undefined),
* strokeWidth: number,
* size: number,
* lineCap: string,
* lineDash: Array.<number>,
* lineJoin: string,
* miterLimit: number
* }}
*/
ol.RegularShapeRenderOptions;
/**
* Number of features; bounds/extent.
* @typedef {{numberOfFeatures: number,
* bounds: module:ol/extent~Extent}}
*/
ol.WFSFeatureCollectionMetadata;
/**
* Total deleted; total inserted; total updated; array of insert ids.
* @typedef {{totalDeleted: number,
* totalInserted: number,
* totalUpdated: number,
* insertIds: Array.<string>}}
*/
ol.WFSTransactionResponse;