Spec-Zone.ru › OpenLayers

ol/style/Fill~Fill


import Fill from 'ol/style/Fill.js';

Set fill style for vector features.

new Fill(options)

style/Fill.js, line 24
Name Type Description
color Color | ColorLike | PatternDescriptor | null (defaults to null)

A color, gradient or pattern. See Color and ColorLike for possible formats. For polygon fills (not for RegularShape fills), a pattern can also be provided as PatternDescriptor. Default null; if null, the Canvas/renderer default black will be used.

Methods

clone(){Fill}

style/Fill.js, line 52

Clones the style. The color is not cloned if it is a ColorLike.

Returns:
The cloned style.

getColor(){Color | ColorLike | PatternDescriptor | null}

style/Fill.js, line 64

Get the fill color.

Returns:
Color.

setColor(color)

style/Fill.js, line 74

Set the color.

Name Type Description
color Color | 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

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API