setView stops in middle of animation #5233

mohsen1 opened this Issue Jan 6, 2017 · 3 comments


None yet

2 participants

mohsen1 commented Jan 6, 2017 edited

How to reproduce

  • Leaflet version I'm using: 1.0.2
  • Browser (with version) I'm using: Chrome
  • OS/Platform (with version) I'm using: macOS
  • step 1 call setView for a place near current view so the map animates to set the new view

Sometimes animation stops midway and the new map view is not the view originally requested. My observation is that this happens more often if

  • from and to views have different zoom levels
  • from and to views are far but not far enough for Leaflet to skip the animation.

Could you provide an example on,output or similar that illustrates the problem?

mohsen1 commented Jan 12, 2017

I couldn't reproduce it in an isolated case. If you visit (you will need to login) the snap to current location is not working properly. We're getting current user location using the geolocation api and setting the lat/lng using the setView function.

I understand it would be almost impossible for you to detect the issue without seeing the code. I'll try to make a failing test case in meanwhile.

mohsen1 commented Jan 18, 2017

This was a bug in our code. Closing.

@mohsen1 mohsen1 closed this Jan 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment