Skip to content

Google Maps Wont restoreState properly when navigating through bottom nav #112

@renzified

Description

@renzified

Environment details

  1. library: com.google.maps.android:maps-compose:2.1.0

Steps to reproduce

  1. clone this repo
  2. add your google api key to the manifest file
  3. Quickly navigate between the bottom tabs and check if the maps is loaded properly
  4. When navigating quickly with the bottom tabs the maps wont restore its state eg. camera position, markers

Observation

The maps will load properly even if we navigate quickly on the bottom tabs when the starting route of nav host is the map to reproduce.

  1. Change the AnimatedNavHost start destination from
AnimatedNavHost(
         navController = navController,
         startDestination = Screen.Other.route
     )

to

AnimatedNavHost(
            navController = navController,
            startDestination = Screen.Map.route
        )

and it will work just fine.

Here is a sample video of the bug

Metadata

Metadata

Assignees

Labels

releasedtriage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions