mapbox / mapbox-gl-js

Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL
https://docs.mapbox.com/mapbox-gl-js/
Other
11.23k stars 2.23k forks source link

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

Open zoltan-mihalyi opened 5 years ago

zoltan-mihalyi commented 5 years ago

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)

ahk commented 5 years ago

Hi @zoltan-mihalyi,

We never managed to push through the bugfix idea in https://github.com/mapbox/mapbox-gl-js/pull/8118, and now we're moving to render all icons with GL_LINEAR interpolation as described here: https://github.com/mapbox/mapbox-gl-js/issues/8730

When this new change is merged soon the bug in the interpolation logic won't be relevant anymore, so I closed the pull request associated with this issue. Hopefully the new behavior we're moving to is better for you, feel free to check on the closed PR (https://github.com/mapbox/mapbox-gl-js/pull/8118) if you think I've missed something.

I'm leaving this open until we merge the new changes (since we still have this bug until they land).

Thanks for the bug report.