ol/style/Fill~Fill
import Fill from 'ol/style/Fill.js';
Set fill style for vector features.
-
new Fill(options)
-
Name Type Description colorColor | ColorLike | PatternDescriptor | null (defaults to null) A color, gradient or pattern. See
ColorandColorLikefor possible formats. For polygon fills (not forRegularShapefills), a pattern can also be provided asPatternDescriptor. Default null; if null, the Canvas/renderer default black will be used.
Methods
-
clone(){Fill}
-
Clones the style. The color is not cloned if it is a
ColorLike.Returns:
The cloned style.
-
getColor(){Color | ColorLike | PatternDescriptor | null}
-
Get the fill color.
Returns:
Color.
-
setColor(color)
-
Set the color.
Name Type Description colorColor | ColorLike | PatternDescriptor | null Color.
© 2005-present, OpenLayers Contributors All rights reserved.Licensed under the BSD 2-Clause License.
https://openlayers.org/en/latest/apidoc/module-ol_style_Fill-Fill.html