mapbox / mapbox/mapbox-gl-js

Don't apply `text-max-angle` check to line labels with `rotation-alignment: viewport`

Open
#7,211 5 comments 0 reactions 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

For now we use the version of Mapbox 0.47.0, in some cases we have a pretty long labels. In the new version of Mapbox 0.48.0 we see a regression associated with the fact that for all the same settings, the label at the same zoom level is not displayed, and to display it you need to zoom in to line.

**Mapbox 0.47.0**
![mapbox show label 0 47 0 - jsfiddle](https://user-images.githubusercontent.com/26249043/44722593-97bce200-aade-11e8-992a-4ad6430d9337.png)
**Mapbox 0.48.0**
![mapbox show label 0 48 0 - jsfiddle](https://user-images.githubusercontent.com/26249043/44722594-97bce200-aade-11e8-8b33-0ace39277e69.png)

**mapbox-gl-js version**: 0.48.0

### Link to Demonstration

Here’s the JSFiddle
for v.0.47.0: https://jsfiddle.net/iv_vo/g6q1rzot/
for v.0.48.0: https://jsfiddle.net/iv_vo/qrombvhf/

### Expected Behavior
Labels are shown at the same zoom level as before
### Actual Behavior
Labels are not shown at the same zoom level as before

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 by comparing the two JSFiddle demonstrations linked in the issue, using the Mapbox GL JS 0.47.0 and 0.48.0 versions to reproduce the label difference. Trace the line-label placement path related to `text-max-angle` and `rotation-alignment: viewport`; done means labels appear at the earlier zoom level without that check affecting them.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.