Skip to content

chore : Centre camera on new location while recomposition #939

Open
LoyalAbbas wants to merge 3 commits into
mainfrom
fix/camera_location_with_recomposition
Open

chore : Centre camera on new location while recomposition #939
LoyalAbbas wants to merge 3 commits into
mainfrom
fix/camera_location_with_recomposition

Conversation

@LoyalAbbas

Copy link
Copy Markdown

What's changed

When clicking the "Change Location" button in the recomposition demo, the map camera now animates to center on the new marker location.

Why

Previously, clicking the button only moved the marker to the new coordinates while the camera stayed still. If you had panned away from Singapore, changing the location would move the marker out of view. This change ensures the camera follows the marker whenever the location changes.

@LoyalAbbas LoyalAbbas changed the title Center camera on new marker location in Recomposition demo Recomposition Demo: Centre camera on new location Jul 6, 2026
@LoyalAbbas LoyalAbbas requested a review from dkhawk July 6, 2026 09:48
@googlemaps-bot

googlemaps-bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Code Coverage

Overall Project 27.55% -0.23% 🍏
Files changed 83.33% 🍏

File Coverage
RecompositionActivity.kt 72.81% -5.94% 🍏

@kikoso kikoso left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Aligns well with other samples.

@kikoso

kikoso commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

@LoyalAbbas , since this is only a change on the demo application, not on the library itself: could you update the header to chore:, to avoid triggering a new release? Thanks!

@LoyalAbbas LoyalAbbas changed the title Recomposition Demo: Centre camera on new location chore : Centre camera on new location while recomposition Jul 6, 2026
@LoyalAbbas

Copy link
Copy Markdown
Author

@kikoso done, please check now

@kikoso

kikoso commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

@LoyalAbbas , ready to get it merged!

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.

4 participants