Module: ol/style/Style




Type Definitions


style/Style.js, line 26

A function that takes an module:ol/Feature as argument and returns an module:ol/geom/Geometry that will be rendered and styled for the feature.


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 and image will be ignored, and the provided function will be called with each render frame for each geometry.

stroke module:ol/style/Stroke~Stroke <optional>

Stroke style.

text module:ol/style/Text~Text <optional>

Text style.

zIndex number <optional>

Z index.


style/Style.js, line 35

Custom renderer function. Takes two arguments:

  1. The pixel coordinates of the geometry in GeoJSON notation.
  2. The module:ol/render~State of the layer renderer.


style/Style.js, line 12

A function that takes an module:ol/Feature and a {number} representing the view's resolution. The function should return a module:ol/style/Style or an array of them. This way e.g. a vector layer can be styled.

A Style, an array of Style, or a StyleFunction.