This syncs up the state of browse layers with URL query parameters. This makes URLs much more reproducible/shareable, and is a step towards linking directly to the browse page (or embedding in an iframe?) from route check.
Note:
If someone changes the URL, there's a full page refresh. We could squeeze everything into the URL fragment if we wanted to change this, but I don't think there's a use case for it
No change for the critical issues layer, because that requires a custom file input
We can't use a single query param (like layers=x,y,z) because some layers have more details
The URL as it is now isn't quite reproducible, because the camera viewport gets ignored. That was a choice made because of a bug in svelte-maplibre that's now fixed, so I'll followup separately and fix on all pages
Demo: https://acteng.github.io/atip/browse_layer_urls/browse.html?style=dataviz&crossings=1&stats19=other%2F2019%2F2022&road_noise=1#5.69/53.021/-1.825
This syncs up the state of browse layers with URL query parameters. This makes URLs much more reproducible/shareable, and is a step towards linking directly to the browse page (or embedding in an iframe?) from route check.
Note:
layers=x,y,z
) because some layers have more details