Billy Newman
07/17/2022, 3:54 PMBilly Newman
07/17/2022, 3:57 PM@Composable
private fun Map() {
var isMapLoaded by remember { mutableStateOf(false) }
GoogleMap(
onMapLoaded = { isMapLoaded = true } // This will cause recompose
) {
if (isMapLoaded) {
// Need to wait for map loaded to preform map camera location animation.
}
// Assume flicker here is caused by recompose and reload of TileOverlay
TileOverlay(tileProvider = MyTileProvider())
}
}
I was under the assumption that the GoogleMap composable would keep track of the TileOverlay and not reload it on recompose. Is that assumption wrong? Something else I am doing wrong?
I can put the TileOverlay inside the isMapLoaded check to fix/workaround the issue. However at that point should I put everything map related inside that if statement?Billy Newman
07/18/2022, 1:59 PMChris Arriola
08/09/2022, 8:51 PMremember
the MyTileProvider
. sorry for the delay here.Billy Newman
08/09/2022, 9:06 PM