Style state management in local storage #1747
Closed
JinIgarashi
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, GeoHub uses svelte store to save LayerList and maplibre map object in the memory. If user move to another page from the map, their working data will be destroyed. It would be nice if we can store those states in local storage and restore them when they come back to map editor.
local storage keys
layer-list-{host name}
$layerList
variablemap-style-{host name}
map-style-id-{host name}
style
query paramIn map editor
LayerList.svelte
Store every change on $layerList and maplibre style to local storage
When the page is mounted
style
query param in URLstyle
query paramstyle
query param in URLWhen user is leaving from map
Nothing to do?
When user share map
Beta Was this translation helpful? Give feedback.
All reactions