On this page

Function groupByLayout

  • Groups layers by their layout-affecting properties. These are the properties that were formerly used by explicit ref mechanism for layers: 'type', 'source', 'source-layer', 'minzoom', 'maxzoom', 'filter', and 'layout'.

    The input is not modified. The output layers are references to the input layers.

    Parameters

    Returns LayerSpecification[][]

    an array of arrays of LayerSpecification objects, where each inner array contains layers that share the same layout-affecting properties.

Was this helpful?
SDK JS
Reference
groupByLayout