Classes
Type Definitions
-
A function that takes an
module:ol/Feature~Feature
as argument and returns anmodule:ol/geom/Geometry~Geometry
that will be rendered and styled for the feature. -
Options{Object}
-
Properties:
Name Type Argument Description geometry
string | module:ol/geom/Geometry~Geometry | module:ol/style/Style~GeometryFunction <optional>
Feature property or geometry or function returning a geometry to render for this style.
fill
module:ol/style/Fill~Fill <optional>
Fill style.
image
module:ol/style/Image~ImageStyle <optional>
Image style.
renderer
module:ol/style/Style~RenderFunction <optional>
Custom renderer. When configured,
fill
,stroke
andimage
will be ignored, and the provided function will be called with each render frame for each geometry.hitDetectionRenderer
module:ol/style/Style~RenderFunction <optional>
Custom renderer for hit detection. If provided will be used in hit detection rendering.
stroke
module:ol/style/Stroke~Stroke <optional>
Stroke style.
text
module:ol/style/Text~Text <optional>
Text style.
zIndex
number <optional>
Z index.
-
Custom renderer function. Takes two arguments:
- The pixel coordinates of the geometry in GeoJSON notation.
- The
module:ol/render~State
of the layer renderer.
-
A function that takes an
module:ol/Feature~Feature
and a{number}
representing the view's resolution. The function should return amodule:ol/style/Style~Style
or an array of them. This way e.g. a vector layer can be styled. If the function returnsundefined
, the feature will not be rendered. -
StyleLike{Style} {Array.<module:ol/style/Style~Style>} {module:ol/style/Style~StyleFunction}
-
A
Style
, an array ofStyle
, or aStyleFunction
.