Layer Control
Layer control provides functions to set properties of each layer, such as layer addition, deletion, and color and style.
setLayer
Adds a FATOS style layer to the map's style.
map.setLayer(layer, beforlayerID);Parameter
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
Last updated