Skip to content

fix(maps-compose): apply initial camera during map creation - #1027

Open
RotBolt wants to merge 1 commit into
googlemaps:mainfrom
RotBolt:fix/491-initial-camera-options
Open

RotBolt wants to merge 1 commit into
googlemaps:mainfrom
RotBolt:fix/491-initial-camera-options

Conversation

@RotBolt

@RotBolt RotBolt commented Oct 6, 2026

Copy link
Copy Markdown

Fixes #491.

Summary

  • Apply CameraPositionState.position to GoogleMapOptions before MapView creation when the factory has not set a camera.
  • Preserve a camera explicitly supplied through googleMapOptionsFactory.
  • Add instrumentation coverage for both option paths.

Validation

  • :maps-compose:compileDebugKotlin — passed
  • :maps-app:compileDebugAndroidTestKotlin — passed
  • :maps-compose:testDebugUnitTest — passed (no unit tests in module)
  • lint — passed
  • Both new focused instrumentation tests — passed on Pixel 10 Pro Fold emulator

The full GoogleMapViewTests run also included 17 tests that require a Maps API key; they were assumption-failed because no key is configured.

  • Opened issue before implementation
  • Tests added
  • Lint passed
  • Coverage report reviewed

@google-cla

google-cla Bot commented Oct 6, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@RotBolt
RotBolt marked this pull request as ready for review October 6, 2026 08:00
@RotBolt
RotBolt marked this pull request as draft October 6, 2026 08:03
@RotBolt
RotBolt marked this pull request as ready for review October 6, 2026 08:15

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Map initialization with desired configuration is delayed

2 participants