Interface HasBaseLayerOptions
- All Known Subinterfaces:
HasBaseImageLayerOptions
,HasBaseTileLayerOptions
,HasBaseVectorOptions
- All Known Implementing Classes:
BaseImageLayer
,BaseImageLayerOptions
,BaseLayerOptions
,BaseTileLayer
,BaseTileLayerOptions
,BaseVectorLayer
,BaseVectorLayerOptions
,ImageLayer
,ImageLayerOptions
,Layer
,NoOpImageLayer
,NoOpTileLayer
,NoOpVectorLayer
,TileLayer
,TileLayerOptions
,VectorLayer
,VectorLayerOptions
public interface HasBaseLayerOptions
Base options for each layer that extends
Layer
.
For more details see: layer docs
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setClassName
(String className) Set a CSS class name to the layer element.void
Sets the bounding extent for layer rendering.void
setMaxZoom
(Integer maxZoom) Sets the maximum view zoom level (inclusive) at which layer will be visible.void
setMinZoom
(Integer minZoom) Sets the minimum view zoom level (exclusive) above which layer will be visible.void
setOpacity
(Double opacity) Sets the opacity of the layer, allowed values range from 0 to 1.void
setVisible
(Boolean visible) Set the visibility of the layer.void
Sets the z-index for layer rendering.
-
Method Details
-
getClassName
String getClassName()- Returns:
- a CSS class name that should be used by the layer element,
null
value means that default value is used: 'ol-layer
'
-
setClassName
Set a CSS class name to the layer element. The default value 'ol-layer
'.Note, CSS class name is set only at creation time and cannot be changed at runtime.
For more details see: Layer docs
- Parameters:
className
- CSS class name
-
getOpacity
Double getOpacity()- Returns:
- the opacity of the layer.
null
value means that default value is used: '1
'
-
setOpacity
Sets the opacity of the layer, allowed values range from 0 to 1. The default value is '1
'.For more details see: setOpacity() docs
- Parameters:
opacity
- opacity of the layer
-
isVisible
Boolean isVisible()- Returns:
- the visibility of the layer.
null
value means that default value is used: 'true
'
-
setVisible
Set the visibility of the layer. The default value istrue
.For more details see: setVisible() docs
- Parameters:
visible
- whether layer should be visible
-
getExtent
Extent getExtent()- Returns:
- the bounding extent for layer rendering or
null
if not set
-
setExtent
Sets the bounding extent for layer rendering. The layer will not be rendered outside of this extent. If not set, the layer will be visible at all extents.For more details see: setExtent() docs
- Parameters:
extent
- extent at which the layer is visible
-
getZIndex
Integer getZIndex()- Returns:
- z-index for layer rendering or
null
if not set
-
setZIndex
Sets the z-index for layer rendering.At rendering time, the layers will be ordered, first by Z-index and then by position. The default value is
0
.For more details see: setZIndex() docs
- Parameters:
zIndex
- z-index for layer rendering
-
getMinZoom
Integer getMinZoom()- Returns:
- the minimum view zoom level (exclusive) above which layer will be visible or
null
if not set
-
setMinZoom
Sets the minimum view zoom level (exclusive) above which layer will be visible. Note that the zoom levels for layer visibility are based on the view zoom level, which may be different from a tile source zoom level.For more details see: setMinZoom() docs
- Parameters:
minZoom
- zoom level (exclusive) above which layer will be visible
-
getMaxZoom
Integer getMaxZoom()- Returns:
- the maximum view zoom level (inclusive) at which layer will be visible or
null
if not set
-
setMaxZoom
Sets the maximum view zoom level (inclusive) at which layer will be visible. Note that the zoom levels for layer visibility are based on the view zoom level, which may be different from a tile source zoom level.For more details see: setMaxZoom() docs
- Parameters:
maxZoom
- zoom level (inclusive) at which layer will be visible
-