Comments (10)
hello? ist this normal behaviour or did I do something wrong?
from heatmap.js.
In the dataset you pass to the heatmap layer try not passing a value for each point. The documentation says that it defaults to 1 but at least in the heatmap-leaflet implementation, this is a lie. I found this works well when you've got a large dataset.
from heatmap.js.
Well, the reason I chose this library was that it is able to handle values for data points. I tried to debug this error and came to the conclusion that the 1px gradient line, which gets contstructed and repeatedly applied to form a circle, looks correct. (color change in the middle between green & red) so I think the error is created later. But I'm definitely a noobie on javascript graphics :/
from heatmap.js.
Certainly, it should work correctly if you're passing through logical values to the data points. You'll start having problems (similar to what you describe above) when all your data points have values of 1. My suggestion was just a stab in the dark having not looked at your code, though it sounds like I was a bit off :)
from heatmap.js.
I'm using this code to add data to the heat map. All values are min-max normalized, so all values are between [0,1] with only 1 (or very few) values being == 1. (For detailed infos, please have a look at the JS-Code @http://h1968061.stratoserver.net/myhive/)
window.heatmapLayer = L.TileLayer.heatMap({
radius: { value: 450, absolute: true },
opacity: 0.6
});
heatmapLayer.setData(generatePoints()); // where this is a set of (lat,lon,value)
from heatmap.js.
Please note that I'm no expert with this library, I've just been battling with it today for the first time. That said, it looks like you generate your points every time you zoom the map, only adding the points to the heatmap layer that fall within the bounds you're viewing. I'm assuming this will cause a few problems:
-
zoom in and then pan to the left. No new data points for the heatmap will be rendered on the map, they'll only show up when you zoom again.
-
the max value will be recalculated (based on the highest value of any of the rendered data points), so the intensity of a single point will change based on what points are currently rendered. ie. zoom down to street level with only a single point and the max value becomes whatever the value of that point is. The point is therefore rendered as if it had the highest intensity.
You'd have to check out the performance impact, but I would load all of the points in each separate category you have into a separate feature groups (you could even use the leaflet layers control to show these on your map instead of your sidebar, alternatively do it programmatically using the same approach).
from heatmap.js.
Having the same issue with this any update on how to fix this?
from heatmap.js.
I am also having the same issue. My heatmap just looks like a giant blob with a slim ring of other colors around it.
from heatmap.js.
Could you try it with the new heatmap.js v2.0 release? The rendering mechanism changed a lot
from heatmap.js.
also having this issue. values are 0-100. getting a giant circle blob.
edit: using the latest version
from heatmap.js.
Related Issues (20)
- 'TypeError: offset required' when using Heatmap.js with local tests HOT 1
- Blur disappears after seconds
- 如何清空渲染的数据 HOT 3
- Make datapoint disapear after some time? HOT 1
- TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element HOT 1
- All points whose radii overlap the view should be rendered
- Loaded longitude and latitude HOT 4
- setData bug HOT 1
- I issued this by mistake, please remove it.
- How to use in a backend Node JS environment? HOT 1
- leaflet heatmap - crash when zoom out
- Issue when set value 0 for dataPoints
- heatmap issue on certain phones/browsers
- Cannot remove the heatmap layer HOT 1
- setData problem in chrome
- How to use Heatmap Animation Example? HOT 1
- How to avoid the warning about Canvas2D in the browser's console
- img.data is read-only, and assigning to it throws a TypeError in strict mode HOT 1
- ImageData data assignment in Strict Mode 2.0.5 HOT 1
- Is this project still alive? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heatmap.js.