-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve location detection / save #48
Comments
It seems like there is a plugin Leaflet.RestoreView for keeping the last map position. Should be straightforward to add, I can do that, not really a need for a PR. But generally, contributions are welcome! Using the leaflet-locatecontrol you linked is already on my to-do list together with some basic mobile support. |
… position between sessions (nrenner#48)
So this issue could be split up in two tasks:
Basic mobile support would be awesome indeed when you must check routes while traveling 😃. Looking forward for it too! edit: added todos in first post to have them displayed on issues page as well. |
… position between sessions (nrenner#48)
… position between sessions (nrenner#48)
Currently when one opens http://brouter.de/brouter-web, he always get map centered on Frankfurt with zoom level 8 or so, the first thing to do is to move the map over his own position.
It could be great to save the last used position so that when you always bike in the same area, you do not need to re-localize yourself again. I know that permalink can solve this issue, but I'd like to know if a cookie could be saved to store position for default position (like openstreetmap.org does for instance, but also google maps)?
I'd be glad to make a PR for this if you think it's worth it!
edit: a "localize me" button could be nice too, see this demo.
Leaflet.RestoreView
plugin to save and restore last map view. Cf PR Use leaflet.restoreview.js plugin to save and restore last user's map… #49Localize me
button usingleaflet-locatecontrol
plugin. Cf PR Use leaflet.restoreview.js plugin to save and restore last user's map… #49The text was updated successfully, but these errors were encountered: