-
Notifications
You must be signed in to change notification settings - Fork 90
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
How to add more parameters to persist #5
Comments
I played around with adding named hash parameters to the map so you could track them and use them regardless of order in your URL. As we all know hashes (especially those that look like normal params) can be tricky so think about the trade-offs using these vs. actual params if you go this route. My changes move away from the original intent of leaflet-hash quite a bit so I didn't submit a pull request, but if people think it'd be useful it's available on my fork or I can submit a PR here on a branch or something. The following format works and will get detected and center the map with the forked code: The code also includes a couple of helpers to get params, update params, and remove them. Obviously no warranties and happy to take suggestions. |
@sephcoster That looks really interesting. Have you considered keeping the leaflet-hash string as one param, similar to how the OSM website does it? http://www.openstreetmap.org/#map=15/37.7984/-122.2768&layers=C That way it's a lot easier to copy and paste that |
Has anyone an idea how to make a hash including the base maps and all chosen geojason layers? |
Wondered how one would go about adding more parameters apart from lat,lng,zoom . For example to persist layer ordering and display ?
The text was updated successfully, but these errors were encountered: