Class: Circle

ol.style.Circle


import Circle from 'ol/style/circle';

Set circle style for vector features.

new ol.style.Circle(opt_options)

src/ol/style/circle.js, line 16
Name Type Description
options

Options.

Name Type Description
fill ol.style.Fill | undefined

Fill style.

radius number

Circle radius. Required.

snapToPixel boolean | undefined

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. Default value is true.

stroke ol.style.Stroke | undefined

Stroke style.

atlasManager ol.style.AtlasManager | undefined

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.

Extends

Methods

clone(){ol.style.RegularShape} inherited

src/ol/style/regularshape.js, line 145

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.

getAnchor(){Array.<number>} inherited

src/ol/style/regularshape.js, line 168

Get the anchor point in pixels. The anchor determines the center point for the symbolizer.

Returns:
Anchor.

getAngle(){number} inherited

src/ol/style/regularshape.js, line 178

Get the angle used in generating the shape.

Returns:
Shape's rotation in radians.

getFill(){ol.style.Fill} inherited

src/ol/style/regularshape.js, line 188

Get the fill style for the shape.

Returns:
Fill style.

getImage(pixelRatio){HTMLCanvasElement|HTMLVideoElement|Image} inherited

src/ol/style/regularshape.js, line 205

Get the image element for the symbolizer.

Name Type Description
pixelRatio number

Pixel ratio.

Returns:
Image element.

getOpacity(){number} inherited

src/ol/style/image.js, line 55

Get the symbolizer opacity.

Returns:
Opacity.

getOrigin(){Array.<number>} inherited

src/ol/style/regularshape.js, line 238

Get the origin of the symbolizer.

Returns:
Origin.

getPoints(){number} inherited

src/ol/style/regularshape.js, line 248

Get the number of points for generating the shape.

Returns:
Number of points for stars and regular polygons.

getRadius(){number} inherited

src/ol/style/regularshape.js, line 258

Get the (primary) radius for the shape.

Returns:
Radius.

getRadius2(){number|undefined} inherited

src/ol/style/regularshape.js, line 268

Get the secondary radius for the shape.

Returns:
Radius2.

getRotateWithView(){boolean} inherited

src/ol/style/image.js, line 65

Determine whether the symbolizer rotates with the map.

Returns:
Rotate with map.

getRotation(){number} inherited

src/ol/style/image.js, line 75

Get the symoblizer rotation.

Returns:
Rotation.

getScale(){number} inherited

src/ol/style/image.js, line 85

Get the symbolizer scale.

Returns:
Scale.

getSize(){ol.Size} inherited

src/ol/style/regularshape.js, line 277

Get the size of the symbolizer (in pixels).

Returns:
Size.

getSnapToPixel(){boolean} inherited

src/ol/style/image.js, line 95

Determine whether the symbolizer should be snapped to a pixel.

Returns:
The symbolizer should snap to a pixel.

getStroke(){ol.style.Stroke} inherited

src/ol/style/regularshape.js, line 287

Get the stroke style for the shape.

Returns:
Stroke style.

setOpacity(opacity) inherited

src/ol/style/image.js, line 169

Set the opacity.

Name Type Description
opacity number

Opacity.

setRadius(radius)

src/ol/style/circle.js, line 59

Set the circle radius.

Name Type Description
radius number

Circle radius.

setRotation(rotation) inherited

src/ol/style/image.js, line 190

Set the rotation.

Name Type Description
rotation number

Rotation.

setScale(scale) inherited

src/ol/style/image.js, line 201

Set the scale.

Name Type Description
scale number

Scale.