nptscot / nptscot.github.io

Network Planning Tool for Scotland: front end.
https://www.npt.scot
GNU Affero General Public License v3.0
7 stars 5 forks source link

Layer state permalinks #147

Closed mvl22 closed 3 months ago

mvl22 commented 4 months ago

Layer state is currently not reflected in the URL, so sending a link to another person will lose this. Therefore, the URL should contain the layer list.

To do this properly, using HTML5 History, this will require a rewriting solution, as otherwise /layer1,layer2/ (or whatever) will not exist on the server; it needs to be internally rewritten to /.

A hash-based solution is possible, but this would firstly require reimplementing the Mapbox GL JS hash mode manually.

mvl22 commented 4 months ago

This is now implemented, to the level of enabled layers and map position within the hash state.

Future work will implement parameter state within layers.

A hash-based solution is possible, but this would firstly require reimplementing the Mapbox GL JS hash mode manually.

These were both implemented.

Robinlovelace commented 4 months ago

Good time for me to test locally @mvl22 ? Will aim to test today.