Layers
A style's layers property lists all the layers available in that style.
Last updated
A style's layers property lists all the layers available in that style.
Last updated
Adds a FATOS style layer to the map's style.
Required Parameter | Description | Type |
---|---|---|
Optional Parameter | Description | Type |
---|---|---|
Moves a layer to a different z-position.
Removes the layer with the given ID from the map's style.
Returns the layer with the specified ID in the map's style.
Sets the filter for the specified style layer.
Returns the filter applied to the specified style layer.
Returns the filter applied to the specified style layer.
Returns the value of a paint property in the specified style layer.
Sets the value of a layout property in the specified style layer.
Returns the value of a layout property in the specified style layer.
Required Parameter | Description | Type |
---|---|---|
Required Parameter | Description | Type |
---|---|---|
Required Parameter | Description | Type |
---|---|---|
Required Parameter | Description | Type |
---|---|---|
Required Parameter | Description | Type |
---|---|---|
Required Parameter | Description | Type |
---|---|---|
Required Parameter | Description | Type |
---|---|---|
Required Parameter | Description | Type |
---|---|---|
Required Parameter | Description | Type |
---|---|---|
id
A unique identifier that you define.
String
source
The data source for the layer. Reference a source that has already been defined using the source's unique id.
String
type
The type of layer (ex. fill or symbol)
A list of layer types is available in the Style Specification
String
filter
An expression specifying conditions on source features. Only features that match the filter are displayed.
Array
minzoom
The minimum zoom level for the layer.
number
maxzoom
The maximum zoom level for the layer.
number
layout
Layout properties for the layer. Available layout properties vary by layer.type
.
A full list of layout properties for each layer type is available in the Style Specification
Object
paint
Paint properties for the layer. Available paint properties vary by layer.type
.
A full list of paint properties for each layer type is available in the Style Specification
Object
beforlayerID
The ID of an existing layer to insert the new layer before, resulting in the new layer appearing visually beneath the existing layer.
String
id
The ID of the layer to move.
String
beforlayerID
The ID of an existing layer to insert the new layer before. When viewing the map, the id
layer will appear beneath the beforeId
layer.
String
id
ID of the layer to remove.
String
id
The ID of the layer to get.
String
layerId
The ID of the layer to which the filter will be applied.
String
filter
Filters control which features a style layer renders from its source.
Array | null
layerId
The ID of the style layer whose filter to get.
String
layerId
The ID of the layer to set the paint property in.
String
name
The name of the paint property to set.
String
value
The value of the paint property to set. Must be of a type appropriate for the property
any
layerId
The ID of the layer to get the paint property from.
String
name
The name of the paint property to set.
String
layerId
The ID of the layer to set the layout property in.
String
name
The name of the layout property to set.
String
value
The value of the layout property. Must be of a type appropriate for the property
any
layerId
TThe ID of the layer to get the layout property from.
String
name
The name of the layout property to get.
String