Skip to content

Create CameraFollowState#1476

Draft
ksharma-xyz wants to merge 2 commits intomainfrom
02-20-create_camerafollowstate
Draft

Create CameraFollowState#1476
ksharma-xyz wants to merge 2 commits intomainfrom
02-20-create_camerafollowstate

Conversation

@ksharma-xyz
Copy link
Copy Markdown
Owner

Create CameraFollowState

When the user's location updates arrive, the location dot walks off the visible map area because the camera stays fixed after its initial position.

A reusable CameraFollowState helper is built in core/maps/ui so both screens share identical logic

Add smooth location dot animation between GPS fixes

Animate the user location dot between consecutive GPS fixes using
Compose Animatable with LinearEasing over 800 ms (matching
the camera follow animation duration). First fix snaps immediately so
the dot doesn't fly in from (0, 0). Subsequent fixes glide smoothly,
eliminating the jump at 50+ km/h train speeds. Both SearchStopMap and
JourneyMap use the same LatLngToVector TwoWayConverter.

When the user's location updates arrive, the location dot walks off the visible map area because the camera stays fixed after its initial position.

A reusable CameraFollowState helper is built in core/maps/ui so both screens share identical logic
  Animate the user location dot between consecutive GPS fixes using
  Compose Animatable<LatLng> with LinearEasing over 800 ms (matching
  the camera follow animation duration). First fix snaps immediately so
  the dot doesn't fly in from (0, 0). Subsequent fixes glide smoothly,
  eliminating the jump at 50+ km/h train speeds. Both SearchStopMap and
  JourneyMap use the same LatLngToVector TwoWayConverter.
Copy link
Copy Markdown
Owner Author

ksharma-xyz commented Apr 12, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ksharma-xyz ksharma-xyz mentioned this pull request Apr 12, 2026
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.

1 participant