visgl / visgl/react-map-gl

onMouseEnter isn't triggered when moving between layers from different sources

Open
#1,671 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I wanted onMouseEnter to trigger when moving between layers from different sources but it only triggers for the first layer entered.

Here is a gif showing the problem.
map-gl

And here is a codesandbox with the example.
https://codesandbox.io/s/gracious-greider-08zrq

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 running the linked CodeSandbox and reproducing the interaction shown in the GIF while moving between layers from different sources. Trace the existing onMouseEnter event behavior and verify that each newly entered layer triggers the callback, then confirm the corrected behavior with the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.