fill-pattern with step zoom does not show up on load
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
The `fill-pattern` property doesn't appear to be working properly when it changes based on a step zoom function like this:
```
[
"step",
["zoom"],
"attraction-15",
14,
"american-football-11"
]
```
**mapbox-gl-js version**: 1.10.1
**browser**: Mac OS 10.14.4 Chrome 81.0.4044.138
### Steps to Trigger Behavior
1. Have a style with a `fill-pattern` layer that has a step based on zoom (see above)
2. Load map just past step threshold (14.1)
3. Pattern doesn't show
Also when you start further zoomed-out than threshold (13.9) then zoom in and cross the step threshold, the new pattern does not show up at first.
### Link to Demonstration
https://jsbin.com/qupayegoza/edit?html,output
### Expected Behavior
The pattern should show up when the map first loads and when you cross the step threshold
### Actual Behavior
No pattern shows up when map first loads until you zoom in then out or out then in.
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 JSBin reproduction and the fill-pattern style using the step zoom expression. Reproduce both initial-load cases and the threshold crossing at zoom 14, then trace the fill-pattern handling in mapbox-gl-js. Done means the pattern appears on load and updates when crossing the step threshold without requiring an additional zoom.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100