Skip to content

[Feat] Toggle interactive=true|false on <Layer> #2545

@tordans

Description

@tordans

Target Use Case

Right now, setting the interactiveLayers on <Map> is decoupled from rendering <Layer>s.
We have to find a way to keep those two lists in sync, which can be hard depending on how dynamic the list of layers is and how the app is structures.

Proposal

It would be great if the <Layer> component could track the interactive-flag itself.
The layer is the source of truth for the layer id which is what we need for the interactiveLayers prop on Map, so it is a natural state to also specify if this layer should be interactive or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions