GeoTIFF / georaster-layer-for-leaflet

Display GeoTIFFs and soon other types of raster on your Leaflet Map
https://geotiff.github.io/georaster-layer-for-leaflet-example/
Apache License 2.0
283 stars 57 forks source link

Allow PixelValuesToColorFn to return null values #139

Closed Tommatheussen closed 7 months ago

Tommatheussen commented 7 months ago

Some context: Before the v4 release, I was able to return an empty string in my Typescript code to get around this issue, and it did not render these tiles (or at least, those pixels did not show up, maybe they still got rendered but hidden or something). Now when a '' value is returned, it'll color the pixels black (I sort of can see why, no color values === black), but it yield weird results with other correct pixels in the same tile (see screenshot)

This now also corresponds to the returned values in some of the test files.

image
DanielJDufour commented 7 months ago

Thank you!