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 24
Name Type Description
options

Options.

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

Fill style.

radius number

Circle radius.

stroke module:ol/style/Stroke~Stroke

Stroke style.

displacement Array.<number> (defaults to [0,0])

displacement

Extends

Methods

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

style/Circle.js, line 42

Clones the style.

Returns:
The cloned style.

getAnchor(){Array.<number>} inherited

style/RegularShape.js, line 184

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

Returns:
Anchor.

getAngle(){number} inherited

style/RegularShape.js, line 193

Get the angle used in generating the shape.

Returns:
Shape's rotation in radians.

getDisplacement(){Array.<number>} inherited

style/Image.js, line 131

Get the displacement of the shape

Returns:
Shape's center displacement

getFill(){module:ol/style/Fill~Fill} inherited

style/RegularShape.js, line 202

Get the fill style for the shape.

Returns:
Fill style.

getImage(pixelRatio){HTMLCanvasElement} inherited

style/RegularShape.js, line 224

Get the image icon.

Name Type Description
pixelRatio number

Pixel ratio.

Returns:
Image or Canvas element.

getOpacity(){number} inherited

style/Image.js, line 87

Get the symbolizer opacity.

Returns:
Opacity.

getOrigin(){Array.<number>} inherited

style/RegularShape.js, line 274

Get the origin of the symbolizer.

Returns:
Origin.

getPoints(){number} inherited

style/RegularShape.js, line 283

Get the number of points for generating the shape.

Returns:
Number of points for stars and regular polygons.

getRadius(){number} inherited

style/RegularShape.js, line 292

Get the (primary) radius for the shape.

Returns:
Radius.

getRadius2(){number|undefined} inherited

style/RegularShape.js, line 301

Get the secondary radius for the shape.

Returns:
Radius2.

getRotateWithView(){boolean} inherited

style/Image.js, line 96

Determine whether the symbolizer rotates with the map.

Returns:
Rotate with map.

getRotation(){number} inherited

style/Image.js, line 105

Get the symoblizer rotation.

Returns:
Rotation.

getScale(){number|module:ol/size~Size} inherited

style/Image.js, line 114

Get the symbolizer scale.

Returns:
Scale.

getSize(){module:ol/size~Size} inherited

style/RegularShape.js, line 310

Get the size of the symbolizer (in pixels).

Returns:
Size.

getStroke(){module:ol/style/Stroke~Stroke} inherited

style/RegularShape.js, line 319

Get the stroke style for the shape.

Returns:
Stroke style.

setOpacity(opacity) inherited

style/Image.js, line 219

Set the opacity.

Name Type Description
opacity number

Opacity.

setRadius(radius)

style/Circle.js, line 60

Set the circle radius.

Name Type Description
radius number

Circle radius.

setRotateWithView(rotateWithView) inherited

style/Image.js, line 229

Set whether to rotate the style with the view.

Name Type Description
rotateWithView boolean

Rotate with map.

setRotation(rotation) inherited

style/Image.js, line 239

Set the rotation.

Name Type Description
rotation number

Rotation.

setScale(scale) inherited

style/Image.js, line 248

Set the scale.

Name Type Description
scale number | module:ol/size~Size

Scale.