text size not updating correctly by zoom interpolation
Open
Nobody has claimed this yet.
bug :lady_beetle:
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
Expected Behavior
When using a text-size value like this:
[
'interpolate',
['linear'],
['zoom'],
0,
12,
7.9,
28,
8,
14,
22,
36
]
I would expect the size of the font to jump down to 14px in size at z8 but its happening at z7 instead.
Actual Behavior

mapbox-gl-js version: v1.2.0
browser: Chrome Version 75.0.3770.142 (Official Build) (64-bit)
Link to Demonstration
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 JSFiddle and reproduce the text-size expression using mapbox-gl-js v1.2.0. Trace how zoom interpolation evaluates the 7.9 and 8 stops, then verify that the font size changes to 14px at z8; add or update a regression test if the relevant test location is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100