Leaflet / Leaflet.heat

A tiny, simple and fast heatmap plugin for Leaflet.
http://leaflet.github.io/Leaflet.heat/demo
BSD 2-Clause "Simplified" License
1.54k stars 525 forks source link

Misalignment when pinch-zooming #55

Open IvanSanchez opened 8 years ago

IvanSanchez commented 8 years ago

From https://github.com/Leaflet/Leaflet/issues/4511 by @mgleahy:


Hello all,

I'm trying out leaflet-heat, and would like to work with the 1.0.0-rc1 version of leaaflet. So far, pretty much everything is working fairly well, except that the pinch zoom of a leaflet-heat layer on a mobile device does not animate with the rest of the map. It works fine with leaflet-0.7.7.

I'm just wondering if someone knows what I would need to change in the leaflet-heat source to make it play nice with leaflet 1.0.0...any suggestions?

Here's a sample - open it on an iPad, or other touch device...then try a pinch zoom:

http://playground-leaflet.rhcloud.com/tohi/1

treac1e commented 8 months ago

This bug still exists. Just open the demo http://leaflet.github.io/Leaflet.heat/demo/ on your mobile phone or tablet and try to pinch zoom (use 2 fingers to move the map around and to zoom in or out with the same gesture). You can see, that the underlaying map acts like it should, but the canvas with the heatmap stays where it was and then jumps to the new location and zoom level only when the fingers are released from the screen.

Does anybody has an idea how to correct this? It used to work fine in older versions of Leaflet.

Any help or a patch is very much appreceated.