heatmap.js icon indicating copy to clipboard operation
heatmap.js copied to clipboard

getValueAt + leaflet

Open banduk opened this issue 7 years ago • 2 comments

Hi,

I know the question is a bit open, but had anyone tryied to use getValueAt with the leaflet plugin?

I'm having issues to get the value of a point. I guess this has something to do with the kind of coordinates used. It seems it is not getting the correct value from the gradient.

The farthest I got was shadowCtx.getImageData(point.x, point.y, 1, 1) and the img.data[3] is always 0 even when expected different values.

banduk avatar Nov 15 '17 15:11 banduk

@banduk use ContainerPoint https://github.com/pa7/heatmap.js/blob/master/plugins/leaflet-heatmap/leaflet-heatmap.js#L134

cqq626 avatar Apr 24 '18 09:04 cqq626

Hey I think the answer was this: shadowCtx._heatmap.getImageData({ x: x, y: y});

youngclaude avatar Sep 18 '19 21:09 youngclaude