spatialsparks / Leaflet.idw

A small Leaflet plugin to generate an IDW interpolation map
BSD 2-Clause "Simplified" License
84 stars 32 forks source link

Set range #5

Closed gnato closed 5 years ago

gnato commented 6 years ago

In your plugin there is an option to set maximum value. But there is no option to set minimum value. I've read a little about IDW, and if I understood corectly the minimum value is always 0. But what about situation where I would like to render heatmp from -50 to 0? Is there a quick fix to deal with it?

Qinode commented 6 years ago

Hi, gnato. I need this feature recently as well so I forked this project and added an options as displayValue, like the concept in MatLab heatmap. And by default, my fork of the project displays the colour relative to the maximum and the minimum of the data. Maybe you could have a look at it if you still need this feature.

spatialsparks commented 5 years ago

Hi there Cool, thanks a lot for sharing your fork! An easy hack would have been to just add to the values so that the smallest value is 0 for the interpolation (if smallest value is -50, just add 50 and visualise). But the hack seems to be obsolete with Qinodes work, thanks :) cheers