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
306 stars 58 forks source link

add an updateColors method for dynamical pixel color updates. #54

Closed Rennzie closed 3 years ago

Rennzie commented 3 years ago

Closes https://github.com/GeoTIFF/georaster-layer-for-leaflet/issues/53

Adds support for dynamically updating pixel colours of a map using pixelValuesToColorFn.

I also added some updates to the README. I this is accepted I'll add an example here as well.

Can be tested by loading up the dynamic_threshold_ndvi.html test file and move the range slider up and down.

DanielJDufour commented 3 years ago

This is awesome thank you. I'll try to give some quick feedback now and do a more thorough code review later.

Rennzie commented 3 years ago

Hey @DanielJDufour, thanks so much for the review. Lots of useful comments and suggestions. I've made almost all the suggested changes. The one exception is using a destructured object in the updateColors method. Could you have a look at my replies to your comments and let me know what you think. Otherwise the changes have been delivered and ready for another review.

Rennzie commented 3 years ago

@DanielJDufour you last changes are done. I really appreciate the riggor of your reviews!

Hope this gets it over the line but definitley let me know if you want any other changes. If there are it will be in the new year most likely. I'm shutting down the github for the next 2 weeks. Happy holidays if you celebrate it. Looking forward to getting stuck in with some more contributions next year.

DanielJDufour commented 3 years ago

@Rennzie , happy holidays to you, too!