new BaseLayer(options)
Name | Type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Layer options.
|
Methods
-
Return the
extent
of the layer orundefined
if it will be visible regardless of extent.Returns:
The layer extent.
-
getMaxResolution(){number}
layer/Base.js, line 136 -
Return the maximum resolution of the layer.
Returns:
The maximum resolution of the layer.
-
getMinResolution(){number}
layer/Base.js, line 146 -
Return the minimum resolution of the layer.
Returns:
The minimum resolution of the layer.
-
getOpacity(){number}
layer/Base.js, line 156 -
Return the opacity of the layer (between 0 and 1).
Returns:
The opacity of the layer.
-
getVisible(){boolean}
layer/Base.js, line 172 -
Return the visibility of the layer (
true
orfalse
).Returns:
The visibility of the layer.
-
getZIndex(){number}
layer/Base.js, line 183 -
Return the Z-index of the layer, which is used to order layers before rendering. The default Z-index is 0.
Returns:
The Z-index of the layer.
-
setExtent(extent)
layer/Base.js, line 194 -
Set the extent at which the layer is visible. If
undefined
, the layer will be visible at all extents.Name Type Description extent
module:ol/extent~Extent | undefined The extent of the layer.
-
setMaxResolution(maxResolution)
layer/Base.js, line 204 -
Set the maximum resolution at which the layer is visible.
Name Type Description maxResolution
number The maximum resolution of the layer.
-
setMinResolution(minResolution)
layer/Base.js, line 214 -
Set the minimum resolution at which the layer is visible.
Name Type Description minResolution
number The minimum resolution of the layer.
-
setOpacity(opacity)
layer/Base.js, line 224 -
Set the opacity of the layer, allowed values range from 0 to 1.
Name Type Description opacity
number The opacity of the layer.
-
setVisible(visible)
layer/Base.js, line 234 -
Set the visibility of the layer (
true
orfalse
).Name Type Description visible
boolean The visibility of the layer.
-
setZIndex(zindex)
layer/Base.js, line 245 -
Set Z-index of the layer, which is used to order layers before rendering. The default Z-index is 0.
Name Type Description zindex
number The z-index of the layer.