mapbox-gl-js icon indicating copy to clipboard operation
mapbox-gl-js copied to clipboard

Raster layer paint raster resampling set to nearest does not work as expected

Open InzeNL opened this issue 1 year ago • 1 comments

mapbox-gl-js version: v3.4.0

browser: Chrome 125

Steps to Trigger Behavior

  1. Upload a raster file (file used in example can be found here)
  2. Add the raster source with this file to mapbox
  3. Add the raster layer with "paint"."raster-resampling" set to "nearest"
  4. Zoom in

Link to Demonstration

https://jsbin.com/bekoxekoqi/edit?html,js,output

Expected Behavior

Mapbox should display something like this (taken from QGIS) image

Actual Behavior

It still seems to do some type of linear scaling image

InzeNL avatar Jun 06 '24 13:06 InzeNL

Hi @InzeNL,

It might be related to https://github.com/mapbox/mapbox-gl-js/issues/7331. Could you please try the latest GL JS version and see if you can reproduce this issue? Please also check that the tiff file you provided can be loaded in the jsbin example.

stepankuzmin avatar Oct 09 '24 08:10 stepankuzmin