-
Notifications
You must be signed in to change notification settings - Fork 173
Description
Thanks for stopping by to let us know something could be better!
PLEASE READ
If you have a support contract with Google, please create an issue in the support console. This will ensure a timely response.
Discover additional support services for the Google Maps Platform, including developer communities, technical guidance, and expert support at the Google Maps Platform support resources page.
If your bug or feature request is not related to this particular library, please visit the Google Maps Platform issue trackers.
Check for answers on StackOverflow with the google-maps tag.
Please be sure to include as much information as possible:
Environment details
- Specify the API at the beginning of the title (for example, "Places: ...")
- OS type and version
- Library version and other environment information
Steps to reproduce
Hard to reproduce this reliably, but it's clear by looking at the code that the GoogleMap composable does not reattempt initialization when it fails.
android-maps-compose/maps-compose/src/main/java/com/google/maps/android/compose/GoogleMap.kt
Lines 116 to 126 in d213333
| val googleMapsInitializer = LocalGoogleMapsInitializer.current | |
| val initializationState by googleMapsInitializer.state | |
| if (initializationState != InitializationState.SUCCESS) { | |
| val context = LocalContext.current | |
| LaunchedEffect(Unit) { | |
| // Coroutine to initialize Google Maps SDK. | |
| // This will run once when the composable is first displayed. | |
| googleMapsInitializer.initialize(context) | |
| } | |
| } |
Recently there was a change that set the InitializerState back to UNINITIALIZED when initialization failed. Since this composable isn't leveraging that, it can get in a state where it never initializes properly.