Classes
Type Definitions
-
DeclutterMode{"declutter"} {"obstacle"} {"none"}
-
Defines how symbols and text are decluttered on layers ith
declutter
set totrue
- declutter: Overlapping symbols and text are decluttered.
- obstacle: Symbols and text are rendered, but serve as obstacle for subsequent attempts to place a symbol or text at the same location.
- none: No decluttering is done.
-
A function that takes a
Feature
as argument and returns anGeometry
that will be rendered and styled for the feature. -
Options{Object}
-
Properties:
Name Type Description geometry
string | Geometry | GeometryFunction | undefined Feature property or geometry or function returning a geometry to render for this style.
fill
Fill | undefined Fill style.
image
ImageStyle | undefined Image style.
renderer
RenderFunction | undefined 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 | undefined Custom renderer for hit detection. If provided will be used in hit detection rendering.
stroke
Stroke | undefined Stroke style.
text
Text | undefined Text style.
zIndex
number | undefined 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 a
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
.