PolygonExtrusionLayerOptions interface
Options used when rendering Polygon
and MultiPolygon
objects in a PolygonExtrusionLayer
.
- Extends
Properties
base | The height in meters to extrude the base of this layer.
This height is relative to the ground.
Must be greater or equal to 0 and less than or equal to |
fill |
The color to fill the polygons with.
Ignored if |
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). |
height | The height in meters to extrude this layer.
This height is relative to the ground.
Must be a number greater or equal to 0.
Default |
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. |
translate | The polygons' pixel offset.
Values are [x, y] where negatives indicate left and up, respectively.
Default |
translate |
Specifies the frame of reference for `"map"`: Polygons are translated relative to the map. `"viewport"`: Polygons are translated relative to the viewport. Default: `"map"` |
vertical |
Specifies if the polygon should have a vertical gradient on the sides of the extrusion.
Default: |
Inherited Properties
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 |
visible | Specifies if the layer is visible or not.
Default |
Property Details
base
The height in meters to extrude the base of this layer.
This height is relative to the ground.
Must be greater or equal to 0 and less than or equal to height
.
Default 0
.
base?: number | DataDrivenPropertyValueSpecification<number>
Property Value
number | DataDrivenPropertyValueSpecification<number>
fillColor
The color to fill the polygons with.
Ignored if fillPattern
is set.
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 1
.
fillOpacity?: number
Property Value
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
Property Value
string
height
The height in meters to extrude this layer.
This height is relative to the ground.
Must be a number greater or equal to 0.
Default 0
height?: number | DataDrivenPropertyValueSpecification<number>
Property Value
number | DataDrivenPropertyValueSpecification<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
translate
The polygons' pixel offset.
Values are [x, y] where negatives indicate left and up, respectively.
Default [0, 0]
translate?: Pixel
Property Value
translateAnchor
Specifies the frame of reference for translate
.
`"map"`: Polygons are translated relative to the map.
`"viewport"`: Polygons are translated relative to the viewport.
Default: `"map"`translateAnchor?: "map" | "viewport"
Property Value
"map" | "viewport"
verticalGradient
Specifies if the polygon should have a vertical gradient on the sides of the extrusion.
Default: true
verticalGradient?: boolean
Property Value
boolean
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