Get Leaflet FlyTo callback fucntion

Viewed 1455

How can i get leaflet FlyTo callback function?

This is my code

map.flyTo([lat, lng], zoom);

I test this way but not work for me

map.flyTo([lat, lng], zoom, function () {

});
1 Answers

There is no callback functionality for flyTo - try catching either the zoomend or moveend events as an alternative.

map.on('zoomend', function () {
    console.log("callback zoomend")
});
Related