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.