diff --git a/externs/xol.js b/externs/xol.js index 8b6992537d..d45b78ee07 100644 --- a/externs/xol.js +++ b/externs/xol.js @@ -1,191 +1,4 @@ -/** - * @typedef {Object} layer_LayerOptions - * @property {number|undefined} opacity Opacity (0, 1). Default is `1`. - * @property {ol.source.Source|undefined} source Source for this layer. If not provided to the constructor, the source can - * be set by calling {@link ol.layer.Layer#setSource layer.setSource(source)} - * after construction. - * @property {boolean|undefined} visible Visibility. Default is `true` (visible). - * @property {ol.Extent|undefined} extent The bounding extent for layer rendering. The layer will not be rendered - * outside of this extent. - * @property {number|undefined} zIndex The z-index for layer rendering. At rendering time, the layers will be - * ordered, first by Z-index and then by position. The default Z-index is 0. - * @property {number|undefined} minResolution The minimum resolution (inclusive) at which this layer will be visible. - * @property {number|undefined} maxResolution The maximum resolution (exclusive) below which this layer will be visible. - */ - - -/** - * @typedef {Object} layer_GroupOptions - * @property {number|undefined} opacity Opacity (0, 1). Default is `1`. - * @property {boolean|undefined} visible Visibility. Default is `true`. - * @property {ol.Extent|undefined} extent The bounding extent for layer rendering. The layer will not be rendered - * outside of this extent. - * @property {number|undefined} zIndex The z-index for layer rendering. At rendering time, the layers will be - * ordered, first by Z-index and then by position. The default Z-index is 0. - * @property {number|undefined} minResolution The minimum resolution (inclusive) at which this layer will be visible. - * @property {number|undefined} maxResolution The maximum resolution (exclusive) below which this layer will be visible. - * @property {Array.|ol.Collection.|undefined} layers Child layers. - */ - - -/** - * @typedef {Object} layer_HeatmapOptions - * @property {Array.|undefined} gradient The color gradient of the heatmap, specified as an array of CSS color - * strings. Default is `['#00f', '#0ff', '#0f0', '#ff0', '#f00']`. - * @property {number|undefined} radius Radius size in pixels. Default is `8`. - * @property {number|undefined} blur Blur size in pixels. Default is `15`. - * @property {number|undefined} shadow Shadow size in pixels. Default is `250`. - * @property {string|function(module:ol/Feature~Feature):number|undefined} weight The feature attribute to use for the weight or a function that returns a - * weight from a feature. Weight values should range from 0 to 1 (and values - * outside will be clamped to that range). Default is `weight`. - * @property {ol.Extent|undefined} extent The bounding extent for layer rendering. The layer will not be rendered - * outside of this extent. - * @property {number|undefined} minResolution The minimum resolution (inclusive) at which this layer will be visible. - * @property {number|undefined} maxResolution The maximum resolution (exclusive) below which this layer will be visible. - * @property {number|undefined} opacity Opacity. 0-1. Default is `1`. - * @property {ol.source.Vector} source Source. - * @property {boolean|undefined} visible Visibility. Default is `true` (visible). - * @property {number|undefined} zIndex The z-index for layer rendering. At rendering time, the layers will be - * ordered, first by Z-index and then by position. The default Z-index is 0. - */ - - -/** - * @typedef {Object} layer_ImageOptions - * @property {number|undefined} opacity Opacity (0, 1). Default is `1`. - * @property {ol.source.Image} source Source for this layer. - * @property {ol.PluggableMap|undefined} map Sets the layer as overlay on a map. The map will not manage this layer in its - * layers collection, and the layer will be rendered on top. This is useful for - * temporary layers. The standard way to add a layer to a map and have it - * managed by the map is to use {@link ol.Map#addLayer}. - * @property {boolean|undefined} visible Visibility. Default is `true` (visible). - * @property {ol.Extent|undefined} extent The bounding extent for layer rendering. The layer will not be rendered - * outside of this extent. - * @property {number|undefined} minResolution The minimum resolution (inclusive) at which this layer will be visible. - * @property {number|undefined} maxResolution The maximum resolution (exclusive) below which this layer will be visible. - * @property {number|undefined} zIndex The z-index for layer rendering. At rendering time, the layers will be - * ordered, first by Z-index and then by position. The default Z-index is 0. - */ - - -/** - * @typedef {Object} layer_TileOptions - * @property {number|undefined} opacity Opacity (0, 1). Default is `1`. - * @property {number|undefined} preload Preload. Load low-resolution tiles up to `preload` levels. By default - * `preload` is `0`, which means no preloading. - * @property {ol.source.Tile} source Source for this layer. - * @property {ol.PluggableMap|undefined} map Sets the layer as overlay on a map. The map will not manage this layer in its - * layers collection, and the layer will be rendered on top. This is useful for - * temporary layers. The standard way to add a layer to a map and have it - * managed by the map is to use {@link ol.Map#addLayer}. - * @property {boolean|undefined} visible Visibility. Default is `true` (visible). - * @property {ol.Extent|undefined} extent The bounding extent for layer rendering. The layer will not be rendered - * outside of this extent. - * @property {number|undefined} minResolution The minimum resolution (inclusive) at which this layer will be visible. - * @property {number|undefined} maxResolution The maximum resolution (exclusive) below which this layer will be visible. - * @property {boolean|undefined} useInterimTilesOnError Use interim tiles on error. Default is `true`. - * @property {number|undefined} zIndex The z-index for layer rendering. At rendering time, the layers will be - * ordered, first by Z-index and then by position. The default Z-index is 0. - */ - - -/** - * @typedef {Object} layer_VectorOptions - * @property {ol.layer.VectorRenderType|string|undefined} renderMode Render mode for vector layers: - * * `'image'`: Vector layers are rendered as images. Great performance, but - * point symbols and texts are always rotated with the view and pixels are - * scaled during zoom animations. - * * `'vector'`: Vector layers are rendered as vectors. Most accurate rendering - * even during animations, but slower performance. - * Default is `vector`. - * @property {ol.RenderOrderFunction|null|undefined} renderOrder Render order. Function to be used when sorting features before rendering. By - * default features are drawn in the order that they are created. Use `null` to - * avoid the sort, but get an undefined draw order. - * @property {ol.PluggableMap|undefined} map Sets the layer as overlay on a map. The map will not manage this layer in its - * layers collection, and the layer will be rendered on top. This is useful for - * temporary layers. The standard way to add a layer to a map and have it - * managed by the map is to use {@link ol.Map#addLayer}. - * @property {ol.Extent|undefined} extent The bounding extent for layer rendering. The layer will not be rendered - * outside of this extent. - * @property {number|undefined} minResolution The minimum resolution (inclusive) at which this layer will be visible. - * @property {number|undefined} maxResolution The maximum resolution (exclusive) below which this layer will be visible. - * @property {number|undefined} opacity Opacity. 0-1. Default is `1`. - * @property {number|undefined} renderBuffer The buffer around the viewport extent used by the renderer when getting - * features from the vector source for the rendering or hit-detection. - * Recommended value: the size of the largest symbol, line width or label. - * Default is 100 pixels. - * @property {ol.source.Vector} source Source. - * @property {boolean|undefined} declutter Declutter images and text. Decluttering is applied to all image and text - * styles, and the priority is defined by the z-index of the style. Lower - * z-index means higher priority. Default is `false`. - * @property {ol.style.Style|Array.|ol.StyleFunction|undefined} style Layer style. See {@link ol.style} for default style which will be used if - * this is not defined. - * @property {number|undefined} maxTilesLoading Maximum number tiles to load simultaneously. Default is `16`. - * @property {boolean|undefined} updateWhileAnimating When set to `true`, feature batches will be recreated during animations. - * This means that no vectors will be shown clipped, but the setting will have a - * performance impact for large amounts of vector data. When set to `false`, - * batches will be recreated when no animation is active. Default is `false`. - * @property {boolean|undefined} updateWhileInteracting When set to `true`, feature batches will be recreated during interactions. - * See also `updateWhileAnimating`. Default is `false`. - * @property {boolean|undefined} visible Visibility. Default is `true` (visible). - * @property {number|undefined} zIndex The z-index for layer rendering. At rendering time, the layers will be - * ordered, first by Z-index and then by position. The default Z-index is 0. - */ - - -/** - * @typedef {Object} layer_VectorTileOptions - * @property {number|undefined} renderBuffer The buffer around the tile extent used by the renderer when getting features - * from the vector tile for the rendering or hit-detection. - * Recommended value: Vector tiles are usually generated with a buffer, so this - * value should match the largest possible buffer of the used tiles. It should - * be at least the size of the largest point symbol or line width. - * Default is 100 pixels. - * @property {ol.layer.VectorTileRenderType|string|undefined} renderMode Render mode for vector tiles: - * * `'image'`: Vector tiles are rendered as images. Great performance, but - * point symbols and texts are always rotated with the view and pixels are - * scaled during zoom animations. - * * `'hybrid'`: Polygon and line elements are rendered as images, so pixels - * are scaled during zoom animations. Point symbols and texts are accurately - * rendered as vectors and can stay upright on rotated views. - * * `'vector'`: Vector tiles are rendered as vectors. Most accurate rendering - * even during animations, but slower performance than the other options. - * - * When `declutter` is set to `true`, `'hybrid'` will be used instead of - * `'image'`. The default is `'hybrid'`. - * @property {ol.RenderOrderFunction|undefined} renderOrder Render order. Function to be used when sorting features before rendering. By - * default features are drawn in the order that they are created. - * @property {ol.PluggableMap|undefined} map Sets the layer as overlay on a map. The map will not manage this layer in its - * layers collection, and the layer will be rendered on top. This is useful for - * temporary layers. The standard way to add a layer to a map and have it - * managed by the map is to use {@link ol.Map#addLayer}. - * @property {ol.Extent|undefined} extent The bounding extent for layer rendering. The layer will not be rendered - * outside of this extent. - * @property {number|undefined} minResolution The minimum resolution (inclusive) at which this layer will be visible. - * @property {number|undefined} maxResolution The maximum resolution (exclusive) below which this layer will be visible. - * @property {number|undefined} opacity Opacity. 0-1. Default is `1`. - * @property {number|undefined} preload Preload. Load low-resolution tiles up to `preload` levels. By default - * `preload` is `0`, which means no preloading. - * @property {ol.source.VectorTile|undefined} source Source. - * @property {boolean|undefined} declutter Declutter images and text. Decluttering is applied to all image and text - * styles, and the priority is defined by the z-index of the style. Lower - * z-index means higher priority. When set to `true`, a `renderMode` of - * `'image'` will be overridden with `'hybrid'`. Default is `false`. - * @property {ol.style.Style|Array.|ol.StyleFunction|undefined} style Layer style. See {@link ol.style} for default style which will be used if - * this is not defined. - * @property {boolean|undefined} updateWhileAnimating When set to `true`, feature batches will be recreated during animations. - * This means that no vectors will be shown clipped, but the setting will have a - * performance impact for large amounts of vector data. When set to `false`, - * batches will be recreated when no animation is active. Default is `false`. - * @property {boolean|undefined} updateWhileInteracting When set to `true`, feature batches will be recreated during interactions. - * See also `updateWhileAnimating`. Default is `false`. - * @property {boolean|undefined} visible Visibility. Default is `true` (visible). - * @property {number|undefined} zIndex The z-index for layer rendering. At rendering time, the layers will be - * ordered, first by Z-index and then by position. The default Z-index is 0. - */ - - /** * @typedef {Object} render_State * @property {CanvasRenderingContext2D} context Canvas context that the layer is being rendered to. diff --git a/src/ol/format/WKT.js b/src/ol/format/WKT.js index dad5bc72fb..453741bf7f 100644 --- a/src/ol/format/WKT.js +++ b/src/ol/format/WKT.js @@ -211,13 +211,13 @@ Lexer.prototype.readText_ = function() { /** * Class to parse the tokens from the WKT string. - * @param {ol.format.Lexer} lexer The lexer. + * @param {module:ol/format/WKT~Lexer} lexer The lexer. * @constructor */ const Parser = function(lexer) { /** - * @type {ol.format.Lexer} + * @type {module:ol/format/WKT~Lexer} * @private */ this.lexer_ = lexer; diff --git a/src/ol/layer/Base.js b/src/ol/layer/Base.js index d9092edc62..2c8ba2d79c 100644 --- a/src/ol/layer/Base.js +++ b/src/ol/layer/Base.js @@ -12,7 +12,7 @@ import {assign} from '../obj.js'; * @typedef {Object} Options * @property {number} [opacity=1] Opacity (0, 1). * @property {boolean} [visible=true] Visibility. - * @property {ol.Extent} [extent] The bounding extent for layer rendering. The layer will not be + * @property {module:ol/extent~Extent} [extent] The bounding extent for layer rendering. The layer will not be * rendered outside of this extent. * @property {number} [zIndex=0] The z-index for layer rendering. At rendering time, the layers * will be ordered, first by Z-index and then by position. diff --git a/src/ol/layer/Group.js b/src/ol/layer/Group.js index 1c684987c6..c32acf86f5 100644 --- a/src/ol/layer/Group.js +++ b/src/ol/layer/Group.js @@ -19,7 +19,7 @@ import SourceState from '../source/State.js'; * @typedef {Object} Options * @property {number} [opacity=1] Opacity (0, 1). * @property {boolean} [visible=true] Visibility. - * @property {ol.Extent} [extent] The bounding extent for layer rendering. The layer will not be + * @property {module:ol/extent~Extent} [extent] The bounding extent for layer rendering. The layer will not be * rendered outside of this extent. * @property {number} [zIndex=0] The z-index for layer rendering. At rendering time, the layers * will be ordered, first by Z-index and then by position. @@ -27,7 +27,7 @@ import SourceState from '../source/State.js'; * visible. * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will * be visible. - * @property {(Array.|ol.Collection.)} [layers] Child layers. + * @property {(Array.|module:ol/Collection~Collection.)} [layers] Child layers. */ diff --git a/src/ol/layer/Heatmap.js b/src/ol/layer/Heatmap.js index 84b5f940fa..a070127247 100644 --- a/src/ol/layer/Heatmap.js +++ b/src/ol/layer/Heatmap.js @@ -17,7 +17,7 @@ import Style from '../style/Style.js'; * @typedef {Object} Options * @property {number} [opacity=1] Opacity (0, 1). * @property {boolean} [visible=true] Visibility. - * @property {ol.Extent} [extent] The bounding extent for layer rendering. The layer will not be + * @property {module:ol/extent~Extent} [extent] The bounding extent for layer rendering. The layer will not be * rendered outside of this extent. * @property {number} [zIndex=0] The z-index for layer rendering. At rendering time, the layers * will be ordered, first by Z-index and then by position. diff --git a/src/ol/layer/Image.js b/src/ol/layer/Image.js index ee965cd1c7..5301be8349 100644 --- a/src/ol/layer/Image.js +++ b/src/ol/layer/Image.js @@ -10,7 +10,7 @@ import Layer from '../layer/Layer.js'; * @typedef {Object} Options * @property {number} [opacity=1] Opacity (0, 1). * @property {boolean} [visible=true] Visibility. - * @property {ol.Extent} [extent] The bounding extent for layer rendering. The layer will not be + * @property {module:ol/extent~Extent} [extent] The bounding extent for layer rendering. The layer will not be * rendered outside of this extent. * @property {number} [zIndex=0] The z-index for layer rendering. At rendering time, the layers * will be ordered, first by Z-index and then by position. @@ -18,7 +18,7 @@ import Layer from '../layer/Layer.js'; * visible. * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will * be visible. - * @property {ol.PluggableMap} [map] Sets the layer as overlay on a map. The map will not manage + * @property {module:ol/PluggableMap~PluggableMap} [map] Sets the layer as overlay on a map. The map will not manage * this layer in its layers collection, and the layer will be rendered on top. This is useful for * temporary layers. The standard way to add a layer to a map and have it managed by the map is to * use {@link ol.Map#addLayer}. diff --git a/src/ol/layer/Layer.js b/src/ol/layer/Layer.js index e77863d241..855c5453b0 100644 --- a/src/ol/layer/Layer.js +++ b/src/ol/layer/Layer.js @@ -16,7 +16,7 @@ import SourceState from '../source/State.js'; * @typedef {Object} Options * @property {number} [opacity=1] Opacity (0, 1). * @property {boolean} [visible=true] Visibility. - * @property {ol.Extent} [extent] The bounding extent for layer rendering. The layer will not be + * @property {module:ol/extent~Extent} [extent] The bounding extent for layer rendering. The layer will not be * rendered outside of this extent. * @property {number} [zIndex=0] The z-index for layer rendering. At rendering time, the layers * will be ordered, first by Z-index and then by position. diff --git a/src/ol/layer/Tile.js b/src/ol/layer/Tile.js index c00349f5a2..9f9a5e4732 100644 --- a/src/ol/layer/Tile.js +++ b/src/ol/layer/Tile.js @@ -12,7 +12,7 @@ import {assign} from '../obj.js'; * @typedef {Object} Options * @property {number} [opacity=1] Opacity (0, 1). * @property {boolean} [visible=true] Visibility. - * @property {ol.Extent} [extent] The bounding extent for layer rendering. The layer will not be + * @property {module:ol/extent~Extent} [extent] The bounding extent for layer rendering. The layer will not be * rendered outside of this extent. * @property {number} [zIndex=0] The z-index for layer rendering. At rendering time, the layers * will be ordered, first by Z-index and then by position. @@ -23,7 +23,7 @@ import {assign} from '../obj.js'; * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0` * means no preloading. * @property {ol.source.Tile} [source] Source for this layer. - * @property {ol.PluggableMap} [map] Sets the layer as overlay on a map. The map will not manage + * @property {module:ol/PluggableMap~PluggableMap} [map] Sets the layer as overlay on a map. The map will not manage * this layer in its layers collection, and the layer will be rendered on top. This is useful for * temporary layers. The standard way to add a layer to a map and have it managed by the map is to * use {@link ol.Map#addLayer}. diff --git a/src/ol/layer/Vector.js b/src/ol/layer/Vector.js index e2a8fdaa62..655cdc816c 100644 --- a/src/ol/layer/Vector.js +++ b/src/ol/layer/Vector.js @@ -13,7 +13,7 @@ import {createDefaultStyle, toFunction as toStyleFunction} from '../style/Style. * @typedef {Object} Options * @property {number} [opacity=1] Opacity (0, 1). * @property {boolean} [visible=true] Visibility. - * @property {ol.Extent} [extent] The bounding extent for layer rendering. The layer will not be + * @property {module:ol/extent~Extent} [extent] The bounding extent for layer rendering. The layer will not be * rendered outside of this extent. * @property {number} [zIndex=0] The z-index for layer rendering. At rendering time, the layers * will be ordered, first by Z-index and then by position. @@ -27,13 +27,13 @@ import {createDefaultStyle, toFunction as toStyleFunction} from '../style/Style. * @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the * renderer when getting features from the vector source for the rendering or hit-detection. * Recommended value: the size of the largest symbol, line width or label. - * @property {ol.layer.VectorRenderType|string} [renderMode='vector'] Render mode for vector layers: + * @property {module:ol/layer/VectorRenderType~VectorRenderType|string} [renderMode='vector'] Render mode for vector layers: * * `'image'`: Vector layers are rendered as images. Great performance, but point symbols and * texts are always rotated with the view and pixels are scaled during zoom animations. * * `'vector'`: Vector layers are rendered as vectors. Most accurate rendering even during * animations, but slower performance. * @property {ol.source.Vector} [source] Source. - * @property {ol.PluggableMap} [map] Sets the layer as overlay on a map. The map will not manage + * @property {module:ol/PluggableMap~PluggableMap} [map] Sets the layer as overlay on a map. The map will not manage * this layer in its layers collection, and the layer will be rendered on top. This is useful for * temporary layers. The standard way to add a layer to a map and have it managed by the map is to * use {@link ol.Map#addLayer}. diff --git a/src/ol/layer/VectorTile.js b/src/ol/layer/VectorTile.js index 309f6c1f3c..9d638537e9 100644 --- a/src/ol/layer/VectorTile.js +++ b/src/ol/layer/VectorTile.js @@ -14,7 +14,7 @@ import {assign} from '../obj.js'; * @typedef {Object} Options * @property {number} [opacity=1] Opacity (0, 1). * @property {boolean} [visible=true] Visibility. - * @property {ol.Extent} [extent] The bounding extent for layer rendering. The layer will not be + * @property {module:ol/extent~Extent} [extent] The bounding extent for layer rendering. The layer will not be * rendered outside of this extent. * @property {number} [zIndex=0] The z-index for layer rendering. At rendering time, the layers * will be ordered, first by Z-index and then by position. @@ -30,7 +30,7 @@ import {assign} from '../obj.js'; * Recommended value: Vector tiles are usually generated with a buffer, so this value should match * the largest possible buffer of the used tiles. It should be at least the size of the largest * point symbol or line width. - * @property {ol.layer.VectorRenderType|string} [renderMode='hybrid'] Render mode for vector tiles: + * @property {module:ol/layer/VectorRenderType~VectorRenderType|string} [renderMode='hybrid'] Render mode for vector tiles: * * `'image'`: Vector tiles are rendered as images. Great performance, but point symbols and texts * are always rotated with the view and pixels are scaled during zoom animations. * * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom @@ -41,7 +41,7 @@ import {assign} from '../obj.js'; * * When `declutter` is set to `true`, `'hybrid'` will be used instead of `'image'`. * @property {ol.source.VectorTile} [source] Source. - * @property {ol.PluggableMap} [map] Sets the layer as overlay on a map. The map will not manage + * @property {module:ol/PluggableMap~PluggableMap} [map] Sets the layer as overlay on a map. The map will not manage * this layer in its layers collection, and the layer will be rendered on top. This is useful for * temporary layers. The standard way to add a layer to a map and have it managed by the map is to * use {@link ol.Map#addLayer}.