question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: Heat map created is not what one expects

See original GitHub issue

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)

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:3
  • Comments:5

github_iconTop GitHub Comments

1reaction
achourasiacommented, Oct 3, 2016

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

0reactions
DavidMaercommented, Feb 25, 2019

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Esri Heat Map doesn't show what you would expect
Solved: One would expect that a 'heat map' would show the areas of hottest activity. After all, it is a "heat" map. But...
Read more >
Why does this code not create a heat map in R using ggplot?
I want to create a heatmap that has different colour squares which are darker if the value is higher. I tried the following...
Read more >
HeatMap doesn't use weights · Issue #1271 - GitHub
Somehow it uses weights, but not correctly. In the attached figure you can see that 4 circles are equally weighted and one has...
Read more >
What is a heatmap? How to create and analyze them - FullStory
Heatmaps are a critical tool in your digital experience toolbox. Alongside scroll maps, error click, dead click, and Rage Click™️ maps, ...
Read more >
What's wrong with (Click) Heat Maps? | UseItBetter Blog
The heat map of visitors who failed shows that the visitors failed regardless whether they tried to sign in or register. But can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found