android-maps-compose: Layout using GoogleMap breaks since Compose 1.4.0

I just noticed when updating from Compose BOM 2023.01.00 (Compose 1.3.3) to 2023.03.00 (Compose 1.4.0), a layout with a GoogleMap composable breaks.

I have this (simplified) layout:

Column {
  GoogleMap(
    modifier = Modifier.fillMaxWidth().weight(1f)
  ) {
    …
  }

  Box {
    // More contents
  }
}

so GoogleMap should only take the remaining space. This worked fine before but now the GoogleMap composable fills the whole screen and the contents of Box is not visible anymore.

I’m not sure if this is some incompatibility with Compose 1.4.0?

Using maps-compose version 2.11.3.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 17 (4 by maintainers)

Most upvoted comments

@svenjacobs it didn’t work. I tried 1.5.0-alpha03 and worked fine. I will stick with that ATM

@svenjacobs I did update it on gradle, sync and run. I will try to invalidate cache and try clean and rebuild and see.

It seems this was completely fixed in Compose 1.4.3.

That’s concerning. Will take a look.

Does maps-compose need to be updated to BOM 2023.04.00, too?

I wouldn’t think so, as it should use the version in your project.

same problem face me any sol …?