[Bug] `onMouseMove` ignores `interactiveLayerIds`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 8.5k
- Forks
- 1.4k
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 3
Description
Description
The way I read the docs for onMouseMove (https://visgl.github.io/react-map-gl/docs/api-reference/map#onmousemove) when I specify a layer in interactiveLayerIds, the events should only fire while I move the mouse over one of the elements of those specified layers.
That is how it works for onMouseEnter (console log a) and onMouseLeave (console log b) on the blue line.
However, for onMouseMove the events fire all the time.
Expected Behavior
I expected onMouseMove to behave the same way as onMouseEnter/Leave, to only fire when hovering the blue lines (which are the layer I specified with interactiveLayerIds).
Steps to Reproduce
(On request)
Environment
- Framework version:
"react-map-gl": "^7.0.17", - Map library:
"maplibre-gl": "^2.1.9", - Browser: Chrome
- OS: macOS
Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the onMouseMove API and its interactiveLayerIds behavior described in the issue and documentation link. Reproduce the reported setup with react-map-gl 7.0.17 and maplibre-gl 2.1.9, then compare onMouseMove with onMouseEnter/onMouseLeave; done means movement events fire only while hovering the specified blue layer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100