mapbox / mapbox/mapbox-gl-js

text size not updating correctly by zoom interpolation

Open
#8,720 2 comments 1 reaction 0 assignees View on GitHub

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

text-size


mapbox-gl-js version: v1.2.0
browser: Chrome Version 75.0.3770.142 (Official Build) (64-bit)

Link to Demonstration

https://jsfiddle.net/tristen/a9xhqpfe/

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.