LayerOptions interface

A base class which all other layer options inherit from.

Extends

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

filter

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

filter?: Expression

Property Value

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

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

visible

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

visible?: boolean

Property Value

boolean