Skip to content

Conversation

@RichardJSun
Copy link
Member

Describe what you are trying to do

This pull request implements vehicle off-route detection and handling to improve the accuracy of vehicle location display on the map. It also ensures the animation loop re-renders on route changes and includes minor refactoring for code clarity.

Steps for review

  1. Verify that vehicles are displayed at their actual GPS position when they deviate significantly from the route.
  2. Confirm that vehicle animations restart when the route is updated.
  3. Check that the animation thresholds and state cleanup logic work as expected.

Issues

Fixes: off-route vehicle animation inaccuracies.

Screenshots

N/A

Additional Information

  • Implements off-route detection using a distance threshold from the nearest polyline point.
  • Adjusts animation thresholds for smoother transitions.
  • Cleans up vehicle state on removal to prevent memory leaks.
  • Ensures animation loop re-renders on route changes for accurate vehicle positioning.

@jmccand
Copy link
Collaborator

jmccand commented Dec 21, 2025

Hold tight, we may end up doing this logic on the backend.

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.

3 participants