0

Once it was possible to achieve the fluid motion with Easing Mapbox methods

https://www.mapbox.com/mapbox.js/api/v0.6.7/#mapbox.ease

but the latest API have changed dramatically, is it be possible to achieve the smooth map motion with the modern API?

Using of the old version, still stable 0.6.*, is not the case since a lot of new features are very useful.

Igor
  • 2,619
  • 6
  • 24
  • 36

2 Answers2

1

@mourner mentioned this in his last blog post; Leaflet 0.8 should include this and the pull request still appears to be open. You may be able to use the 0.8-dev branch to get the map.zoomPanTo animations with this.

geografa
  • 701
  • 5
  • 9
0

I've found some discussion on leaflet: https://github.com/Leaflet/Leaflet/pull/1617 That suggests this call

map.setView({ lat, lon }, 15, { 
  pan: { animate: true }, 
  zoom: { animate: true } 
});

But after checking source of setView function it seems that setView is trying to smooth transit when the next point is one window close to the previous

map.setView({ lat, lon}, 15);

Useful links

Igor
  • 2,619
  • 6
  • 24
  • 36