mapbox/mapbox-gl-js

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

开放

#8,110 创建于 2019年4月2日

 (1 条评论) (0 个反应) (0 位负责人)JavaScript (2,203 个派生)batch import
bug :lady_beetle:good first issue

仓库指标

星标
 (10,532 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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)

贡献者指南