acteng / atip

Active Travel Infrastructure Platform
https://acteng.github.io/atip/
Apache License 2.0
22 stars 4 forks source link

Capture browse layer state in the URL #508

Closed dabreegster closed 4 months ago

dabreegster commented 4 months ago

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:

dabreegster commented 4 months ago

Thanks for the review

I didn't fully understand the memory leak

https://learn.svelte.dev/tutorial/auto-subscriptions