[GIS] Leaflet Vector Layers Not Rendering During FlyTo Animation

animationjavascriptleafletvector

In version 1.0 of Leaflet, when using the FlyTo function as per this JSFiddle, is it possible to force vectors to render/ draw as the animation is happening?

My current issue is when using the marker.cluster function, the animation starts and then none of the points display as you would expect until the animation ends.

I believe the issue is like this OpenLayers question, is there a similar solution for Leaflet?

UPDATE: It appears the issue is related predominately to GeoJSON layers, see this first example that animates well and then this example that uses a GeoJSON layer and the animation doesn't render the vector.

Best Answer

Leaflet author here. The vectors should redraw properly. The quote by @nathansnider is referring to the fact that vectors are not reprojected, but they animate with a CSS transform during animation. If they don't redraw, you should set up a JSFiddle test case and file an issue on GitHub.

update: they currently redraw, but are not reprojected until the animation is over as of beta 2. We want to change it so that vectors are reprojected at least per round zoom, or once per a certain interval of time (e.g. 200ms), which should be a good compromise between performance and visual appearance.