O'Reilly logo

OpenLayers 3 : Beginner's Guide by Erik Hazzard, Paul Spencer, Thomas Gratier

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The style class

The style class, ol.style.Style, contains the drawing instructions to be used when rendering a feature. There are five properties we can use when creating a style property:

Name

Type

Description

fill

ol.style.Fill

This style is used when filling polygons. To draw unfilled polygons, leave this property out or set to null.

stroke

ol.style.Stroke

This style is used when drawing lines and drawing the outline of polygons. To draw polygons without an outline, leave this property out or set to null.

image

ol.style.Image

This style is used when drawing points.

text

ol.style.Text

This style is used when drawing text.

zIndex

number

The z-index determines the order in which features are drawn. To ensure ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required