visgl / visgl/react-map-gl

Event binding of Layer

Open
#1,997 4 comments 10 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

<Layer
type="fill"
id="chinaLayerFill"
paint={{
"fill-opacity": 0.35,
"fill-color": "#107DB3",
}}
// Expected support
// onClick={(e) => { ... }}
// onXXX={(e) => {}}
/>

Proposal

Because there are general business requirements, you only want to process binding events on certain layers

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 with the Layer component and its current event-handling behavior in react-map-gl. Define which event props should be supported and how events identify the selected layer, then verify that handlers can be bound only to the intended layers.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.