Open ktugan opened 7 years ago
I implemented my own version of a value based heatmap in a fork without any regards for best practices (since I am not familiar with the javascript ecosystem).
here the diff: https://github.com/ktugan/HexgridHeatmap/commit/7cfa0ec222f72c4abe30c3c74223bbcb0079c615
@ktugan Thanks for taking a crack at adding in this functionality. Your code style is good, but you get rid of the gaussian kernel calculation that makes this work as a heatmap: https://github.com/ktugan/HexgridHeatmap/commit/7cfa0ec222f72c4abe30c3c74223bbcb0079c615#diff-feb43b13521636d30c38958cccf95c91L166
This creates artifacts like those seen here:
If you add in this kernel with your property value code, make a PR to this repo and I will work it in.
I love the library and would like to make a feature request to build a heatmap from values. Here a superior argument from somebody else (from https://github.com/mapbox/mapbox-gl-js/issues/4756):
I can imagine it would work like this:
I assume clustering logic would need little or no changing, but instead of counting all objects are iterated through, the value from the property extracted and the reduce function called.