Class: Fill

ol/style/Fill~Fill


import Fill from 'ol/style/Fill';

Set fill style for vector features.

new Fill(opt_options)

style/Fill.js, line 21
Name Type Description
options

Options.

Name Type Description
color module:ol/color~Color | module:ol/colorlike~ColorLike

A color, gradient or pattern. See module:ol/color~Color and module:ol/colorlike~ColorLike for possible formats. Default null; if null, the Canvas/renderer default black will be used.

Methods

clone(){module:ol/style/Fill~Fill}

style/Fill.js, line 47

Clones the style. The color is not cloned if it is an module:ol/colorlike~ColorLike.

Returns:
The cloned style.

getColor(){module:ol/color~Color|module:ol/colorlike~ColorLike}

style/Fill.js, line 59

Get the fill color.

Returns:
Color.

setColor(color)

style/Fill.js, line 69

Set the color.

Name Type Description
color module:ol/color~Color | module:ol/colorlike~ColorLike

Color.