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

Options.

Name Type Description
color module:ol/color~Color | module:ol/colorlike~ColorLike (defaults to null)

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 39

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 51

Get the fill color.

Returns:
Color.

setColor(color)

style/Fill.js, line 61

Set the color.

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

Color.