Skip to content

iOS Off-Route Detection Not Working in flutter_mapbox_navigation #405

Description

@wasim-cct

When using the flutter_mapbox_navigation package, off-route detection works as expected on Android, triggering the user_off_route event when the user deviates from the route. However, on iOS, the user_off_route event is not triggered, even when the user is significantly off the planned route.

Steps to Reproduce:

Set up flutter_mapbox_navigation as per the documentation pub.dev.
Configure a route with waypoints using MapBoxNavigation.instance.startNavigation or buildRoute.

MapBoxNavigation.instance.registerRouteEventListener((e) async {
if (e.eventType == MapBoxEvent.user_off_route) {
print("User is off-route!");
}
});

Test navigation on Android and iOS devices.
Deviate from the route during navigation (e.g., move 50+ meters off the path).
Observe that the user_off_route event fires on Android but not on iOS.
Expected Behavior:
The user_off_route event should be triggered on iOS when the user deviates from the route, consistent with Android behavior.

Actual Behavior:
On iOS, the user_off_route event is not triggered, even when the user is significantly off-route.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions