You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature request.
Thanks for the excellent work with the lib and the work maintaining it!
Would love it if setBearing would accept something similar to the regular setView() for animating the update (zoom/pan options contain an animate: true). Example for setView: map.setView(pos, zoomLevel, {animate: true, duration: 2.0, easeLinearity: 0.25});
Suggest a similar api for setBearing as well map.setBearing(-heading, {animate: true, duration: 2.0, easeLinearity: 0.25});
or preferably a new setView variant with bearing (and animate options): map.setBearingView(pos, zoomLevel, -heading, {animate: true, duration: 2.0, easeLinearity: 0.25});
But...
Would love it even more if it could be combined with setView and others (panBy comes to mind) for one smooth update. Or some other way of combining an animated update, but that is missing in leaflet itself I guess?
My use case is updating map on every gps position update (once every second). Moving map and a vehicle marker with animations makes it very smooth, but rotating the map in the heading direction is very sudden and almost disorienting at times.
So currently if I want to set rotation and updating map position it can't(?) be done in one animation anyway:
Will (too) quickly rotate the map and then after that the map will move smoothly animated. So hence the second api suggestion above.
Adding further to the use case is that it would be preferable if we saw more ahead of us than behind so off-setting it a bit with panBy() is already show casing the same problem, can't (?) start two animated movements with leaflet so have to do without the nice smooth animated updates, like this:
Would there be any way to have multiple such map state changes animated as one? An update(), commit(). The vehicle marker itself is fine because can update separately by itself, not part of map state (zoom, center etc). Or new calls adding to existing animation if not overlapping params..
I've found the https://leafletjs.com/reference.html#posanimation L.PosAnimation and somethign similar for the map itself woudl be useful but that is more of a leaflet issue.
Any ideas or input appreciated.
The text was updated successfully, but these errors were encountered:
Feature request.
Thanks for the excellent work with the lib and the work maintaining it!
Would love it if setBearing would accept something similar to the regular setView() for animating the update (zoom/pan options contain an animate: true). Example for setView:
map.setView(pos, zoomLevel, {animate: true, duration: 2.0, easeLinearity: 0.25});
Suggest a similar api for setBearing as well
map.setBearing(-heading, {animate: true, duration: 2.0, easeLinearity: 0.25});
or preferably a new setView variant with bearing (and animate options):
map.setBearingView(pos, zoomLevel, -heading, {animate: true, duration: 2.0, easeLinearity: 0.25});
But...
Would love it even more if it could be combined with setView and others (panBy comes to mind) for one smooth update. Or some other way of combining an animated update, but that is missing in leaflet itself I guess?
My use case is updating map on every gps position update (once every second). Moving map and a vehicle marker with animations makes it very smooth, but rotating the map in the heading direction is very sudden and almost disorienting at times.
So currently if I want to set rotation and updating map position it can't(?) be done in one animation anyway:
Will (too) quickly rotate the map and then after that the map will move smoothly animated. So hence the second api suggestion above.
Adding further to the use case is that it would be preferable if we saw more ahead of us than behind so off-setting it a bit with panBy() is already show casing the same problem, can't (?) start two animated movements with leaflet so have to do without the nice smooth animated updates, like this:
Would there be any way to have multiple such map state changes animated as one? An update(), commit(). The vehicle marker itself is fine because can update separately by itself, not part of map state (zoom, center etc). Or new calls adding to existing animation if not overlapping params..
I've found the https://leafletjs.com/reference.html#posanimation
L.PosAnimation
and somethign similar for the map itself woudl be useful but that is more of a leaflet issue.Any ideas or input appreciated.
The text was updated successfully, but these errors were encountered: