Class: ImageStyle

ol/style/Image~ImageStyle


import ImageStyle from 'ol/style/Image';

A base class used for creating subclasses and not instantiated in apps. Base class for module:ol/style/Icon~Icon, module:ol/style/Circle~CircleStyle and module:ol/style/RegularShape~RegularShape.

new ImageStyle(options)

style/Image.js, line 23
Name Type Description
options

Options.

Name Type Description
opacity number
rotateWithView boolean
rotation number
scale number
snapToPixel boolean

Methods

getOpacity(){number}

style/Image.js, line 66

Get the symbolizer opacity.

Returns:
Opacity.

getRotateWithView(){boolean}

style/Image.js, line 75

Determine whether the symbolizer rotates with the map.

Returns:
Rotate with map.

getRotation(){number}

style/Image.js, line 84

Get the symoblizer rotation.

Returns:
Rotation.

getScale(){number}

style/Image.js, line 93

Get the symbolizer scale.

Returns:
Scale.

getSnapToPixel(){boolean}

style/Image.js, line 102

Determine whether the symbolizer should be snapped to a pixel.

Returns:
The symbolizer should snap to a pixel.

setOpacity(opacity)

style/Image.js, line 167

Set the opacity.

Name Type Description
opacity number

Opacity.

setRotateWithView(rotateWithView)

style/Image.js, line 177

Set whether to rotate the style with the view.

Name Type Description
rotateWithView boolean

Rotate with map.

setRotation(rotation)

style/Image.js, line 187

Set the rotation.

Name Type Description
rotation number

Rotation.

setScale(scale)

style/Image.js, line 197

Set the scale.

Name Type Description
scale number

Scale.

setSnapToPixel(snapToPixel)

style/Image.js, line 207

Set whether to snap the image to the closest pixel.

Name Type Description
snapToPixel boolean

Snap to pixel?