PolygonLayerOptions interface

Options used when rendering Polygon and MultiPolygon objects in a PolygonLayer.

Extends

Properties

fillAntialias

Whether or not the fill should be antialiased. Default true.

fillColor

The color to fill the polygons with. Default "#1E90FF".

fillOpacity

A number between 0 and 1 that indicates the opacity at which the fill will be drawn. Default 0.5.

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).

source

The id or instance of a data source which the layer will render.

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.

Inherited Properties

filter

An expression specifying conditions on source features. Only features that match the filter are displayed.

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.

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.

visible

Specifies if the layer is visible or not. Default true.

Property Details

fillAntialias

Whether or not the fill should be antialiased. Default true.

fillAntialias?: boolean

Property Value

boolean

fillColor

The color to fill the polygons with. Default "#1E90FF".

fillColor?: string | DataDrivenPropertyValueSpecification<string>

Property Value

string | DataDrivenPropertyValueSpecification<string>

fillOpacity

A number between 0 and 1 that indicates the opacity at which the fill will be drawn. Default 0.5.

fillOpacity?: number | DataDrivenPropertyValueSpecification<number>

Property Value

number | DataDrivenPropertyValueSpecification<number>

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 | DataDrivenPropertyValueSpecification<string>

Property Value

string | DataDrivenPropertyValueSpecification<string>

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

Inherited Property Details

filter

An expression specifying conditions on source features. Only features that match the filter are displayed.

filter?: Expression

Property Value

Inherited From LayerOptions.filter

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

Inherited From LayerOptions.maxZoom

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

Inherited From LayerOptions.minZoom

visible

Specifies if the layer is visible or not. Default true.

visible?: boolean

Property Value

boolean

Inherited From LayerOptions.visible