Module: ol/style/RegularShape

ol/style/RegularShape


Classes

RegularShape

Type Definitions

Options{Object}

Specify radius for regular polygons, or radius1 and radius2 for stars.

Properties:
Name Type Argument Default Description
fill module:ol/style/Fill~Fill <optional>

Fill style.

points number

Number of points for stars and regular polygons. In case of a polygon, the number of points is the number of sides.

radius number <optional>

Radius of a regular polygon.

radius1 number <optional>

First radius of a star. Ignored if radius is set.

radius2 number <optional>

Second radius of a star.

angle number <optional>
0

Shape's angle in radians. A value of 0 will have one of the shape's point facing up.

displacement Array.<number> <optional>
[0,0]

Displacement of the shape

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

Stroke style.

rotation number <optional>
0

Rotation in radians (positive rotation clockwise).

rotateWithView boolean <optional>
false

Whether to rotate the shape with the view.

scale number | module:ol/size~Size <optional>
1

Scale. Unless two dimensional scaling is required a better result may be obtained with appropriate settings for radius, radius1 and radius2.

RenderOptions{Object}

Properties:
Name Type Argument Description
strokeStyle module:ol/colorlike~ColorLike <optional>

StrokeStyle.

strokeWidth number

StrokeWidth.

size number

Size.

lineDash Array.<number>

LineDash.

lineDashOffset number

LineDashOffset.

lineJoin CanvasLineJoin

LineJoin.

miterLimit number

MiterLimit.