Class: CircleStyle

ol/style/Circle~CircleStyle


import CircleStyle from 'ol/style/Circle';

Set circle style for vector features.

new CircleStyle(opt_options)

style/Circle.js, line 28
Name Type Description
options

Options.

Name Type Default Description
fill module:ol/style/Fill~Fill

Fill style.

radius number

Circle radius.

snapToPixel boolean true

If true integral numbers of pixels are used as the X and Y pixel coordinate when drawing the circle in the output canvas. If false fractional numbers may be used. Using true allows for "sharp" rendering (no blur), while using false allows for "accurate" rendering. Note that accuracy is important if the circle's position is animated. Without it, the circle may jitter noticeably.

stroke module:ol/style/Stroke~Stroke

Stroke style.

atlasManager module:ol/style/AtlasManager~AtlasManager

The atlas manager to use for this circle. When using WebGL it is recommended to use an atlas manager to avoid texture switching. If an atlas manager is given, the circle is added to an atlas. By default no atlas manager is used.

Methods

clone(){module:ol/style/Circle~CircleStyle}

style/Circle.js, line 53

Clones the style. If an atlasmanager was provided to the original style it will be used in the cloned style, too.

Returns:
The cloned style.

setRadius(radius)

style/Circle.js, line 72

Set the circle radius.

Name Type Description
radius number

Circle radius.