Type Definitions
-
olx.layer.BaseOptions{Object}
-
Properties:
Name Type Argument Description opacity
number | undefined <optional>
Opacity (0, 1). Default is
1
.visible
boolean | undefined <optional>
Visibility. Default is
true
.extent
ol.Extent | undefined <optional>
The bounding extent for layer rendering. The layer will not be rendered outside of this extent.
zIndex
number | undefined <optional>
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.
minResolution
number | undefined <optional>
The minimum resolution (inclusive) at which this layer will be visible.
maxResolution
number | undefined <optional>
The maximum resolution (exclusive) below which this layer will be visible.
-
olx.layer.GroupOptions{Object}
-
Properties:
Name Type Argument Description opacity
number | undefined <optional>
Opacity (0, 1). Default is
1
.visible
boolean | undefined <optional>
Visibility. Default is
true
.extent
ol.Extent | undefined <optional>
The bounding extent for layer rendering. The layer will not be rendered outside of this extent.
zIndex
number | undefined <optional>
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.
minResolution
number | undefined <optional>
The minimum resolution (inclusive) at which this layer will be visible.
maxResolution
number | undefined <optional>
The maximum resolution (exclusive) below which this layer will be visible.
layers
Array.<ol.layer.Base> | ol.Collection.<ol.layer.Base> | undefined <optional>
Child layers.
-
olx.layer.HeatmapOptions{Object}
-
Properties:
Name Type Argument Description gradient
Array.<string> | undefined <optional>
The color gradient of the heatmap, specified as an array of CSS color strings. Default is
['#00f', '#0ff', '#0f0', '#ff0', '#f00']
.radius
number | undefined <optional>
Radius size in pixels. Default is
8
.blur
number | undefined <optional>
Blur size in pixels. Default is
15
.shadow
number | undefined <optional>
Shadow size in pixels. Default is
250
.weight
string | function 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
. Required.extent
ol.Extent | undefined <optional>
The bounding extent for layer rendering. The layer will not be rendered outside of this extent.
minResolution
number | undefined <optional>
The minimum resolution (inclusive) at which this layer will be visible.
maxResolution
number | undefined <optional>
The maximum resolution (exclusive) below which this layer will be visible.
opacity
number | undefined <optional>
Opacity. 0-1. Default is
1
.source
ol.source.Vector Source. Required.
visible
boolean | undefined <optional>
Visibility. Default is
true
(visible).zIndex
number | undefined <optional>
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.
-
olx.layer.ImageOptions{Object}
-
Properties:
Name Type Argument Description opacity
number | undefined <optional>
Opacity (0, 1). Default is
1
.source
ol.source.Image Source for this layer. Required.
map
ol.PluggableMap | undefined <optional>
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
ol.Map#addLayer
.visible
boolean | undefined <optional>
Visibility. Default is
true
(visible).extent
ol.Extent | undefined <optional>
The bounding extent for layer rendering. The layer will not be rendered outside of this extent.
minResolution
number | undefined <optional>
The minimum resolution (inclusive) at which this layer will be visible.
maxResolution
number | undefined <optional>
The maximum resolution (exclusive) below which this layer will be visible.
zIndex
number | undefined <optional>
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.
-
olx.layer.LayerOptions{Object}
-
Properties:
Name Type Argument Description opacity
number | undefined <optional>
Opacity (0, 1). Default is
1
.source
ol.source.Source | undefined <optional>
Source for this layer. If not provided to the constructor, the source can be set by calling
layer.setSource(source)
after construction.visible
boolean | undefined <optional>
Visibility. Default is
true
(visible).extent
ol.Extent | undefined <optional>
The bounding extent for layer rendering. The layer will not be rendered outside of this extent.
zIndex
number | undefined <optional>
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.
minResolution
number | undefined <optional>
The minimum resolution (inclusive) at which this layer will be visible.
maxResolution
number | undefined <optional>
The maximum resolution (exclusive) below which this layer will be visible.
-
olx.layer.TileOptions{Object}
-
Properties:
Name Type Argument Description opacity
number | undefined <optional>
Opacity (0, 1). Default is
1
.preload
number | undefined <optional>
Preload. Load low-resolution tiles up to
preload
levels. By defaultpreload
is0
, which means no preloading.source
ol.source.Tile Source for this layer. Required.
map
ol.PluggableMap | undefined <optional>
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
ol.Map#addLayer
.visible
boolean | undefined <optional>
Visibility. Default is
true
(visible).extent
ol.Extent | undefined <optional>
The bounding extent for layer rendering. The layer will not be rendered outside of this extent.
minResolution
number | undefined <optional>
The minimum resolution (inclusive) at which this layer will be visible.
maxResolution
number | undefined <optional>
The maximum resolution (exclusive) below which this layer will be visible.
useInterimTilesOnError
boolean | undefined <optional>
Use interim tiles on error. Default is
true
.zIndex
number | undefined <optional>
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.
-
olx.layer.VectorOptions{Object}
-
'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 isvector
.
Properties:
Name Type Argument Description renderMode
ol.layer.VectorRenderType | string | undefined <optional>
Render mode for vector layers:
renderOrder
ol.RenderOrderFunction | null | undefined <optional>
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.map
ol.PluggableMap | undefined <optional>
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
ol.Map#addLayer
.extent
ol.Extent | undefined <optional>
The bounding extent for layer rendering. The layer will not be rendered outside of this extent.
minResolution
number | undefined <optional>
The minimum resolution (inclusive) at which this layer will be visible.
maxResolution
number | undefined <optional>
The maximum resolution (exclusive) below which this layer will be visible.
opacity
number | undefined <optional>
Opacity. 0-1. Default is
1
.renderBuffer
number | undefined <optional>
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.
source
ol.source.Vector Source. Required.
declutter
boolean | undefined <optional>
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
.style
ol.style.Style | Array.<ol.style.Style> | ol.StyleFunction | undefined <optional>
Layer style. See
ol.style
for default style which will be used if this is not defined.updateWhileAnimating
boolean | undefined <optional>
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 tofalse
, batches will be recreated when no animation is active. Default isfalse
.updateWhileInteracting
boolean | undefined <optional>
When set to
true
, feature batches will be recreated during interactions. See alsoupdateWhileAnimating
. Default isfalse
.visible
boolean | undefined <optional>
Visibility. Default is
true
(visible).zIndex
number | undefined <optional>
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.
-
olx.layer.VectorTileOptions{Object}
-
'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.
Properties:
Name Type Argument Description renderBuffer
number | undefined <optional>
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.
renderMode
ol.layer.VectorTileRenderType | string | undefined <optional>
Render mode for vector tiles:
When
declutter
is set totrue
,'hybrid'
will be used instead of'image'
. The default is'hybrid'
.renderOrder
ol.RenderOrderFunction | undefined <optional>
Render order. Function to be used when sorting features before rendering. By default features are drawn in the order that they are created.
map
ol.PluggableMap | undefined <optional>
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
ol.Map#addLayer
.extent
ol.Extent | undefined <optional>
The bounding extent for layer rendering. The layer will not be rendered outside of this extent.
minResolution
number | undefined <optional>
The minimum resolution (inclusive) at which this layer will be visible.
maxResolution
number | undefined <optional>
The maximum resolution (exclusive) below which this layer will be visible.
opacity
number | undefined <optional>
Opacity. 0-1. Default is
1
.preload
number | undefined <optional>
Preload. Load low-resolution tiles up to
preload
levels. By defaultpreload
is0
, which means no preloading.source
ol.source.VectorTile | undefined <optional>
Source.
declutter
boolean | undefined <optional>
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
, arenderMode
of'image'
will be overridden with'hybrid'
. Default isfalse
.style
ol.style.Style | Array.<ol.style.Style> | ol.StyleFunction | undefined <optional>
Layer style. See
ol.style
for default style which will be used if this is not defined.updateWhileAnimating
boolean | undefined <optional>
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 tofalse
, batches will be recreated when no animation is active. Default isfalse
.updateWhileInteracting
boolean | undefined <optional>
When set to
true
, feature batches will be recreated during interactions. See alsoupdateWhileAnimating
. Default isfalse
.visible
boolean | undefined <optional>
Visibility. Default is
true
(visible).zIndex
number | undefined <optional>
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.