-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Canvas heatmap #557
Canvas heatmap #557
Conversation
I am still working on it. This is my todo list:
|
ac1daf0
to
262e089
Compare
Out of curiosity, is there a reason we wouldn't just use a standalone library for this? For example, heatcanvas has a similar implementation conceptually, but it also supports web workers and dynamically updating the heatmap. |
We looked into various heatmap implementations out there (I have to check the link you have poster though) and found various sort of issues (in-correct rendering, api mis-match) etc (I don't remember all the details but @dcjohnston might have it documented somewhere). The code is small enough that @dcjohnston and I didn't feel need to use the third party library. |
bd9c8bf
to
7a0b67a
Compare
9faac80
to
eb370db
Compare
eb370db
to
8af2488
Compare
7feb601
to
ea526fa
Compare
02383e3
to
678ff11
Compare
Its ready for review / suggestions. |
5520e56
to
8023c46
Compare
8023c46
to
1c93bab
Compare
I added a commit to improve the performance. Even with this change though, I'm not sure the performance is good enough for this to be useful. Even with as few as 100 points the render call is exceeding the animation frame budget. At 9,000 points I'm getting about 12 fps. I think for something like this to be useful in practice we need to debounce the render calls and apply css transforms to respond to navigation events. This is what is done in the standard leaflet example which handles 10,000 points without breaking a sweat. |
@jbeezley yes performance certainly has be to be improved. The test data that @dcjohnston has (I don't have the number of points on top of my head) it is large and the performance is poor. The leaflet example you posted, @dcjohnston has looked into it.
Applying css transformations would certainly be useful (but I believe will only work in panning though since for zoom events you would have to aggregate). Not sure about debouncing the render calls. Can you explain some more? |
On this note I have only looked into two of the three issues i posted above:
Since I don't have an exact date when @dcjohnston will pick it up on performance. |
The plugin is using simpleheat under the hood (https://github.com/mourner/simpleheat) which we have looked at as well (and have found some issues with it). On the performance note, we should be able to optimize the performance. |
Yes, I agree. Our ultimate goal is to use webgl for this since the performance there would be so much better (and I would like to target that sometime soon, we already have looked into it some). The canvas implementation was the first step in that direction (base class API etc, understanding the canvas performance). |
4d07cef
to
1c93bab
Compare
* intensity must be a positive real number will be used to normalize all | ||
* intensities with a dataset. If no value is given, then a it will | ||
* be computed. | ||
* @returns {geo.heatmapFetures} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
geo.heatmapFeature
LGTM |
No description provided.