Pattern scale reset
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
**Current Issue**
In order for fill patterns to scale with tile sizes between zoom level integers, patterns are scaled up to 200%. If a map designer wants to use a fill pattern, they must be okay with a large range of pattern scaling for their map (_a_). If the map comes to rest in-between integer zoom levels, the patterns can be way off the intended map design (_b_).
**Proposed Solution**
Reset the pattern scale to 100% when the map is at rest. “Rest” could be defined by 200ms of no zooming, but this should be tested. If a user is zooming in and out with a high frequency of stops, a constant resetting of pattern scale could be visually distracting. Currently, place-labels and other symbol layers are being re-rendered when the map is ‘at rest,’ so perhaps resetting the pattern scale would go unnoticed. I could see this enhancement being beneficial for line patterns as well.
_a: scaling range of fill-patterns for one zoom level_

_b: visual difference between scale polars_

cc @ansis @kkaefer @eschow @nickidlugash
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
The issue names no files or tests; start by tracing fill-pattern scaling and the existing at-rest rerender path in mapbox-gl-js. Test stops between integer zoom levels, including rapid repeated stops, and consider the work done when fill and possibly line patterns reset to the intended scale without distracting flicker.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- computer-graphics, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100