new ol.style.Style(opt_options)
Name | Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Style options.
|
Methods
-
Clones the style.
Returns:
The cloned style.
-
Get the fill style.
Returns:
Fill style.
-
Get the geometry to be rendered.
Returns:
Feature property or geometry or function that returns the geometry that will be rendered with this style.
-
Get the function used to generate a geometry for rendering.
Returns:
Function that is called with a feature and returns the geometry to render instead of the feature's geometry.
-
Get the image style.
Returns:
Image style.
-
Get the stroke style.
Returns:
Stroke style.
-
Get the text style.
Returns:
Text style.
-
getZIndex(){number|undefined}
src/ol/style/style.js, line 203 -
Get the z-index for the style.
Returns:
ZIndex.
-
setFill(fill)
src/ol/style/style.js, line 133 -
Set the fill style.
Name Type Description fill
ol.style.Fill Fill style.
-
setGeometry(geometry)
src/ol/style/style.js, line 216 -
Set a geometry that is rendered instead of the feature's geometry.
Name Type Description geometry
string | ol.geom.Geometry | ol.StyleGeometryFunction Feature property or geometry or function returning a geometry to render for this style.
-
setImage(image)
src/ol/style/style.js, line 153 -
Set the image style.
Name Type Description image
ol.style.Image Image style.
-
setStroke(stroke)
src/ol/style/style.js, line 173 -
Set the stroke style.
Name Type Description stroke
ol.style.Stroke Stroke style.
-
setText(text)
src/ol/style/style.js, line 193 -
Set the text style.
Name Type Description text
ol.style.Text Text style.
-
setZIndex(zIndex)
src/ol/style/style.js, line 240 -
Set the z-index.
Name Type Description zIndex
number | undefined ZIndex.