SVG icon-image with filter behaves different than without (Worked with 3.9.2)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
### mapbox-gl-js version
v3.14.0
### Browser and version
Version 139.0.7258.138 (Official Build) (64-bit)
### Expected behavior
Icons are rendered everytime just like without the filter. It works with mapbox 3.9.2
### Actual behavior
Icons are disappearing and appearing depending on zoom level
### Link to the demonstration
https://codepen.io/pomm0/pen/JoYwWPQ
### Steps to trigger the unexpected behavior
* add a valid mapbox accesstoken
* zoom in and out
* do the same without the filter on line 98 (`filter: ['==', 'number', number]`)
https://github.com/user-attachments/assets/aa24f527-c0f9-425c-ae86-69c0172b105d
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 linked CodePen and reproduce the zoom-dependent disappearance in Mapbox GL JS 3.14.0, comparing the SVG icon-image with and without the filter on line 98. Use the working 3.9.2 behavior as a reference; done means filtered icons remain rendered consistently while zooming in and out.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100