Classes
Type Definitions
-
A function that takes an
Feature
as argument and returns anGeometry
that will be rendered and styled for the feature. -
Options{Object}
-
Properties:
Name Type Argument Description geometry
string | Geometry | GeometryFunction <optional>
Feature property or geometry or function returning a geometry to render for this style.
fill
Fill <optional>
Fill style.
image
ImageStyle <optional>
Image style.
renderer
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
RenderFunction <optional>
Custom renderer for hit detection. If provided will be used in hit detection rendering.
stroke
Stroke <optional>
Stroke 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
State
of the layer renderer.
-
A function that takes an
Feature
and a{number}
representing the view's resolution. The function should return aStyle
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<Style>} {StyleFunction}
-
A
Style
, an array ofStyle
, or aStyleFunction
.