mapbox / mapbox/mapbox-gl-js

Symbol interpolation issue when icon-pitch-alignment is "map"

Open
#8,110 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug :lady_beetle: good first issue
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

mapbox-gl-js version: v0.54.0-beta.1

browser: any

Steps to Trigger Behavior
  1. create a symbol layer with icon-pitch-alignment set to "map"
  2. do not rotate or pitch the map
Expected Behavior

Icon should be rendered with NEAREST interpolation

Actual Behavior

Icon is rendered with LINEAR interpolation

Hint: there is a condition in draw_symbol.js:197

pitchWithMap || tr.pitch !== 0

I think it should be just

tr.pitch !== 0

because when icon-pitch-alignment is set to "map", and neither the icon nor the map is rotated, NEAREST should be used. (same as "viewport" alignment)

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 at draw_symbol.js:197 and reproduce the issue with a symbol layer using icon-pitch-alignment set to "map" without rotating or pitching the map. Compare the interpolation behavior with viewport alignment; done means the map-aligned icon uses NEAREST interpolation under these conditions.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.