# Function traverseLayer

- traverseLayer(layer: BaseLayer, ancestors: LayerGroup[], visitor: ((arg0: BaseLayer, arg1: LayerGroup[]) => boolean)): void

- #### Parameters

  - ##### layer: BaseLayer

    A layer tree.

  - ##### ancestors: LayerGroup[]

    The groups to which the layer belongs to.

  - ##### visitor: ((arg0: BaseLayer, arg1: LayerGroup[]) => boolean)

    A function which will return false if descend must stop.

    - - (arg0: BaseLayer, arg1: LayerGroup[]): boolean

      - #### Parameters

        - ##### arg0: BaseLayer

        - ##### arg1: LayerGroup[]

        #### Returns boolean

  #### Returns void

  - Defined in src/offline/utils.js:30

Generated using TypeDoc