immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
44.53k stars 2.16k forks source link

[BUG] Map resets zoom level on dark/light mode toggle #5940

Closed kwongtn closed 6 days ago

kwongtn commented 8 months ago

The bug

As shown per video below, the map in web view resets the zoom level when dark/light mode is being toggled.

https://github.com/immich-app/immich/assets/5886584/cda2cfb2-1ca7-4d46-8826-79baa19c9bc8

The OS that Immich Server is running on

Ubuntu 22.04, Kubernetes 1.29.0 (microk8s)

Version of Immich Server

v1.91.4

Version of Immich Mobile App

N/A

Platform with the issue

Your docker-compose.yml content

N/A

Your .env content

N/A

Reproduction steps

1. Open map page.
2. Zoom in.
3. Toggle light/dark modes.

Additional information

The programatical solution to this would probably be to save a value regarding zoom level & coordinates on each zoom / navigation. When map is reset due to light/dark mode toggle, feed those values in.

danieldietzler commented 8 months ago

Hey, that's a known bug; we currently have to re-draw the entire map because the maplibre library has an issue where layers (particularly the marker layer) will just be removed when hot-reloading the map with a different style. Thus we can't use hot-reload at the moment.

jrasm91 commented 6 days ago

I just tested this and it looks like it persists the location and zoom.