Layers
A style's layers property lists all the layers available in that style.
setLayer
map.setLayer(layer, beforlayerID);Parameter
Required Parameter
Description
Type
Optional Parameter
Description
Type
Example
map.addLayer({
id: 'some Layer ID',
// References the GeoJSON source defined above
// and does not require a `source-layer`
source: 'some Source ID',
//Style Specification
type: 'symbol',
layout: {
// Set the label content to the
// feature's `name` property
'text-field': ['get', 'name'] //or String
}
paint: {
'text-color' : '#000000'
}
});moveLayer
Parameter
Required Parameter
Description
Type
Example
removeLayer
Parameter
Required Parameter
Description
Type
Example
getLayer
Parameter
Required Parameter
Description
Type
Example
setFilter
Parameter
Required Parameter
Description
Type
Example
getFilter
Parameter
Required Parameter
Description
Type
Example
setPaintProperty
Parameter
Required Parameter
Description
Type
Example
getPaintProperty
Parameter
Required Parameter
Description
Type
Example
setLayoutProperty
Parameter
Required Parameter
Description
Type
Example
getLayoutProperty
Parameter
Required Parameter
Description
Type
Example
Last updated
Was this helpful?