googlemaps / googlemaps/android-maps-compose
Google Maps Wont restoreState properly when using restoreState = true while navigating.
- Lingua principale
- Kotlin
- Stelle
- 1.3k
- Fork
- 181
- Merge medio
- 2g 23h
- PR unite (30g)
- 18
Descrizione
#### Environment details
1. Library: com.google.maps.android:maps-compose:6.2.0
2. Navigation library: androidx.navigation:navigation-compose:2.7.7
#### Steps to reproduce
1. Clone this [repo](https://github.com/Del-S/MapIssue).
2. Add google api key to manifest file.
3. Navigate to Map screen and then try to navigate to Map screen again.
#### Observation
Lifecycle observer goes to `ON_DESTROY` and never makes it's way to `ON_RESUME`, which keeps the map in "destroyed" state and it is not usable (cannot scroll, zoom or anything else).
While not using `restoreState` or `saveState` set to `true` the map works fine. Also when downgrading compose map library to `6.0.0` it works properly.
It might be related to already resolved issue: https://github.com/googlemaps/android-maps-compose/issues/112. But due to refactor in https://github.com/googlemaps/android-maps-compose/pull/436 it probably happens again. Not really connected to animations this time. It is probably connected to the restoreState.
Sample [video](https://github.com/user-attachments/assets/b1311720-4b43-4b49-9ed2-efe2e5999ddd) of the issue.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Riproduci il problema utilizzando il repository MapIssue collegato con maps-compose 6.2.0 e Navigation Compose 2.7.7, quindi confronta il comportamento con maps-compose 6.0.0. Esamina il comportamento del ciclo di vita di restoreState nell’area interessata dalla PR di refactoring #436; il lavoro è completo quando tornando alla mappa si raggiunge ON_RESUME e lo scorrimento e lo zoom rimangono utilizzabili.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- kotlin
- Ambito
- mobile
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100