Skip to content
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

Heatmap.js is broken for SPA's #7

Closed
davesauce14 opened this issue Sep 28, 2023 · 2 comments
Closed

Heatmap.js is broken for SPA's #7

davesauce14 opened this issue Sep 28, 2023 · 2 comments

Comments

@davesauce14
Copy link

davesauce14 commented Sep 28, 2023

Heatmap.js while very popular has had a halt in its support for 7 years, and is effectively abandoned.
As a result, it's now broken in all modern browsers.

pa7/heatmap.js#219 // Issue
pa7/heatmap.js#315 // PR never merged by owner

If you are interested in adoption, you might want to use one of the alts that are still getting updates

https://www.npmjs.com/package/keli-heatmap.js
https://www.npmjs.com/package/heatmap.js-fixed

Breakdown of problem:

When cesiumjs-heat / heatmap.js are brought in as modules (this is true for most js framework builds using webpack, vite, etc) the code within modules are executing in strict mode

Canvas2d img.Data has been made immutable in strict mode, and fails when the outdated library tries to update.

Result:

Fatal error unable to draw heatmap to canvas.

@davesauce14
Copy link
Author

Update: I forked locally and tested with heatmap.js-fixed and it solved my issue

@postor
Copy link
Owner

postor commented Oct 5, 2023

updated to heatmap.js-fixed

@postor postor closed this as completed Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants