Leaflet: Map.flyTo does not respect Pan options noMoveStart

Created on 20 Mar 2017  路  8Comments  路  Source: Leaflet/Leaflet

Map.flyTo does not respect Pan options noMoveStart

map.on('movestart', function () { console.log('should not be called') })
map.flyTo([1,1],16, {noStartMove: true})

when map is valid, console the event will be triggered and log to the console.

https://github.com/Leaflet/Leaflet/blob/b997839fe73397330c292dcac1e5a65cb3ea8fdb/src/map/Map.js#L417 is the offending line, should check the options first.

bug good first issue help wanted

Most helpful comment

6685 i posted a PR for the problem with Map.panTo not respecting the option "noStartMove". The panTo function uses setView so it will hopefully solve @bringkings comment aswell.

All 8 comments

The same issue occurs with Map.panTo, when no animation is set, with the offending line: https://github.com/Leaflet/Leaflet/blob/b997839fe73397330c292dcac1e5a65cb3ea8fdb/src/map/Map.js#L200

I tried to recreate your issue and it seems you got wrong your options object
Link to Docs

This should work:
map.flyTo([1,1],16, {noMoveStart: true})

Hello, I am new. I would like to know if this is still an ongoing issue.

I am seeing this on setView as well. It does not respect noMoveStart with version 1.3.4. I will take a stab at fixing this as well, since we need this in our app

6685 i posted a PR for the problem with Map.panTo not respecting the option "noStartMove". The panTo function uses setView so it will hopefully solve @bringkings comment aswell.

Hello, I am new. I would like to know if this is still an ongoing issue.

Same! Is this something I can take a stabbing effort at?

Any progress on this?

This should be fixed!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arminghm picture arminghm  路  3Comments

viswaug picture viswaug  路  4Comments

gdbd picture gdbd  路  3Comments

piehei picture piehei  路  3Comments

brambow picture brambow  路  3Comments