Leaflet.heat
Leaflet.heat copied to clipboard
Bug: Heat map created is not what one expects
There seems to be bug in heat map generation. For example there are five points with different weights and a defined color gradient. Expected output must be these points with different colors, yet the out shows same color for each point.
Below is the example code which generates incorrect output `var map = L.map('map').setView([43.46811941, -90.04569087], 5);
var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(map);
addressPoints = [[42.35810000, -71.06360000, 10.3], [42.82995815, -74.78991444, 0.4], [43.17929819, -78.56603306, 0.5], [43.40320216, -82.37774519, 0.6], [43.49975489, -86.20965845, 0.7], [43.46811941, -90.04569087, 0.8],];
var heat = L.heatLayer(addressPoints, {minOpacity:1, blur:0, max: 1.0}).addTo(map);`
Please see the following fiddles Fiddle with incorrect output using heat_map.js: https://jsfiddle.net/y20js9nm/13/ Fiddle with correct output using heatmap.js: https://jsfiddle.net/pz4usuLe/40/ (had problems with loading external js) Fiddle with correct output using heatmap.js: https://jsfiddle.net/pz4usuLe/43/ (Fixed)
Fixed the JS fiddle that shows correct output with heatmap.js https://jsfiddle.net/pz4usuLe/43/ The Javascript was not loading correctly. I suggest reopening this issue, as this seems to be major bug
So what´s the recommended heatmap to be used?
Hello, I am using heatmap plugin of folium and it is generating incorrect output by ignoring the weights of the locations. As I understand it is due to underlying js which is not loading correctly and ignoring weights. I will appreciate if someone can suggest a workaround. Thanks
Any updates on this?
Hello I'm using heatmap plugin of folium in python. And it is generating an incorrect map by ignoring the weights. How couldI fix this problem in Python?