Wondered how one would go about adding more parameters apart from lat,lng,zoom . For example to persist layer ordering and display ?
Duplicate of #32, which is a duplicate of #10?
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 15/37.7984/-122.2768 string from one map provider to another, assuming they both support the leaflet-hash format.
Has anyone an idea how to make a hash including the base maps and all chosen geojason layers?