Changed Layer settings are reset to the default upon the map refresh
OS & Hardware CentOS Linux release 7.9.2009, Docker version 26.1.4, build 5650f9b
Version 0.25.8
Describe the bug In the map view, if change the default Layer settings (e.g. enable Points), the settings are not retained and reset to the default when the map is refreshed.
To Reproduce Steps to reproduce the behavior:
- Go to the Map view (http://dawarich.local/map)
- Click the Layers button, observe the default settings: Enabled by default are Routes, Heatmap and Confirmed Visits
- Change any of the settings, e.g. enable Points and disable Heatmap
- Refresh the map by refreshing the page in the browser, or clicking the logo in top-left corner, or clicking Search
- The Layer settings are reset to the defaults listed in Step 2.
Expected behavior The Layer settings are saved and kept until the user changes them.
Screenshots Easy to repro but let me know if you'd like me to record the screen to illustrate the behavior.
Logs Doesn't seem to be applicable
Additional context None
Please provide logs from dawarich_app container
Please provide logs from
dawarich_appcontainer
There is nothing to log, this is entirely frontend. There are no network requests made at all.
It's very easy to reproduce:
- Open dawarich
- Open devtools network tab
- From map layers, enable "points" and disable "heatmap"
- Notice no requests sent to the backend
- Refresh the page
- Notice "points" are disabled and "heatmap" is enabled again
Layers selection should be stored in the backend (ideally) or at least in local storage on the frontend.
Ah, misunderstood.
Not preserving layers state (enabled points, disabled heatmap, for example) is the intended behavior. It might be changed in the future.
OK, thanks. Opened a feature request discussion: https://github.com/Freika/dawarich/discussions/1402