mapbox-gl-js
mapbox-gl-js copied to clipboard
Raster layer paint raster resampling set to nearest does not work as expected
mapbox-gl-js version: v3.4.0
browser: Chrome 125
Steps to Trigger Behavior
- Upload a raster file (file used in example can be found here)
- Add the raster source with this file to mapbox
- Add the raster layer with "paint"."raster-resampling" set to "nearest"
- Zoom in
Link to Demonstration
https://jsbin.com/bekoxekoqi/edit?html,js,output
Expected Behavior
Mapbox should display something like this (taken from QGIS)
Actual Behavior
It still seems to do some type of linear scaling
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.