Open eliorar opened 4 years ago
fixed in Pull Request #315. img.data is being mutated by changes to imgData.
You can use this bug-fixed version:npm install @mars3d/heatmap.js
Corresponding source address: https://github.com/muyao1987/heatmap.js
leaflet.js You can use this bug-fixed version:npm install keli-heatmap.js
Corresponding source address: https://www.npmjs.com/package/keli-heatmap.js
img.data = imgData // this line is not working in strict mode (line 527 heatmap.js);
this.ctx.putImageData(img, x, y);
this._renderBoundaries = [1000, 1000, 0, 0];
the error is as follows:TypeError: Cannot assign to read only property 'data' of #<ImageData>
Possible solution: according to documentation: https://developer.mozilla.org/en-US/docs/Web/API/ImageData you should use only putImageData function, so removing
img.data = imgData
resolves the issue