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.11k stars 2.21k forks source link

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

Open InzeNL opened 3 months ago

InzeNL commented 3 months ago

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