visgl / visgl/react-map-gl

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

Open
#2,545 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
TypeScript
Stars
8.5k
Forks
1.4k
Avg merge
5d 17h
Merged PRs (30d)
3

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the and component APIs, focusing on layer IDs and the interactiveLayers prop. Define how an interactive flag on each layer should keep the map's interactive layer list synchronized, including dynamic layer lists; done means the behavior and expected tests are clearly established.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.