Class: Stroke

ol.style.Stroke

Set stroke style for vector features. Note that the defaults given are the Canvas defaults, which will be used if option is not defined. The get functions return whatever was entered in the options; they will not return the default.

new ol.style.Stroke(opt_options) experimental

Name Type Description
options

Options.

Name Type Description
color ol.Color | string | undefined experimental

Color. See ol.color for possible formats. Default null; if null, the Canvas/renderer default black will be used.

lineCap string | undefined experimental

Line cap style: butt, round, or square. Default is round.

lineJoin string | undefined experimental

Line join style: bevel, round, or miter. Default is round.

lineDash Array.<number> | undefined experimental

Line dash pattern. Default is undefined (no dash).

miterLimit number | undefined experimental

Miter limit. Default is 10.

width number | undefined experimental

Width.

Methods

getColor(){ol.Color|string} experimental

Returns:
Color.

getLineCap(){string|undefined} experimental

Returns:
Line cap.

getLineDash(){Array.<number>} experimental

Returns:
Line dash.

getLineJoin(){string|undefined} experimental

Returns:
Line join.

getMiterLimit(){number|undefined} experimental

Returns:
Miter limit.

getWidth(){number|undefined} experimental

Returns:
Width.