PolygonLayerOptions interface
Options used when rendering Polygon and MultiPolygon objects in a PolygonLayer.
- Extends
Properties
| fill |
The color to fill the polygons with.
Default |
| fill |
A number between 0 and 1 that indicates the opacity at which the fill will be drawn.
Default |
| fill |
Name of image in sprite to use for drawing image fills. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). |
| filter | An expression specifying conditions on source features. Only features that match the filter are displayed. |
| max |
An integer specifying the maximum zoom level to render the layer at.
This value is exclusive, i.e. the layer will be visible at |
| min |
An integer specifying the minimum zoom level to render the layer at.
This value is inclusive, i.e. the layer will be visible at |
| source | The id or instance of a data source which the layer will render. |
| source |
Required when the source of the layer is a VectorTileSource. A vector source can have multiple layers within it, this identifies which one to render in this layer. Prohibited for all other types of sources. |
| visible | Specifies if the layer is visible or not.
Default |
Property Details
fillColor
The color to fill the polygons with.
Default "#1E90FF".
fillColor?: string | Expression
Property Value
string | Expression
fillOpacity
A number between 0 and 1 that indicates the opacity at which the fill will be drawn.
Default 0.5.
fillOpacity?: number | Expression
Property Value
number | Expression
fillPattern
Name of image in sprite to use for drawing image fills. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512).
fillPattern?: string | Expression
Property Value
string | Expression
filter
An expression specifying conditions on source features. Only features that match the filter are displayed.
filter?: Expression
Property Value
maxZoom
An integer specifying the maximum zoom level to render the layer at.
This value is exclusive, i.e. the layer will be visible at maxZoom > zoom >= minZoom.
Default 24.
maxZoom?: number
Property Value
number
minZoom
An integer specifying the minimum zoom level to render the layer at.
This value is inclusive, i.e. the layer will be visible at maxZoom > zoom >= minZoom.
Default 0.
minZoom?: number
Property Value
number
source
The id or instance of a data source which the layer will render.
source?: string | Source
Property Value
string | Source
sourceLayer
Required when the source of the layer is a VectorTileSource. A vector source can have multiple layers within it, this identifies which one to render in this layer. Prohibited for all other types of sources.
sourceLayer?: string
Property Value
string
visible
Specifies if the layer is visible or not.
Default true.
visible?: boolean
Property Value
boolean