Skip to content

[Bug]: Walking navigation on iOS has some problems #659

@bderrien

Description

@bderrien

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

Walking navigation on iOS has some problems

Flutter version

3.38.5

Package version

0.8.4

Native SDK versions

  • I haven't changed the version of the native SDKs

Flutter Doctor Output

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.38.5, on macOS 26.4.1 25E253 darwin-arm64, locale en-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0)
[✓] Xcode - develop for iOS and macOS (Xcode 26.4)
[✓] Chrome - develop for the web
[✓] Connected device (5 available)
[✓] Network resources

Steps to reproduce

With the example app on iOS (device or simulator):

OK = camera is following mode
KO = no camera updated to center to the user → no following mode

  1. Go to the navigation page
  2. Switch to walking mode
  3. Click on the map, then add a waypoint

Then I try with some settings for followMyLocation in the _startGuidedNavigation function:

  • With followMyLocation(CameraPerspective.tilted) or without followMyLocation:

    1. Start guidance → KO
    2. Change camera position (by gesture), then click on recenter → KO
    3. Click on compass → OK
    4. Change camera position (by gesture), then click on recenter → OK
  • With CameraPerspective.topDownNorthUp:

    1. Start guidance → OK
    2. Change camera position (by gesture), then click on recenter → OK
    3. Change camera position (by gesture), then click on compass, then click on recenter → OK
    4. Click on compass, then change camera position (by gesture), then click on recenter → KO
  • With CameraPerspective.topDownHeadingUp:

    1. Start guidance → KO
    2. Change camera position (by gesture), then click on recenter → KO
    3. Click on compass → KO
    4. Click on compass → OK
    5. Change camera position (by gesture), then click on compass, then click on recenter → KO
    6. Click on compass, then change camera position (by gesture), then click on recenter → KO

⚠️ Even when I say OK for topDownHeadingUp, I never get a valid heading direction

100% reproducible

Tested on:

  • Real device: iPhone 13 mini (iOS 16.2)
  • Simulator: iPhone 17 (iOS 16.4)

Here is my understanding of the current logic:

  • When the camera is centered on the user, clicking on compass changes the perspective between tilted and topDownNorthUp
  • When the camera is not centered on the user, clicking on it:
    • does nothing in topDownNorthUp
    • works only once in tilted mode
  • When clicking on recenter:
    • it works in topDownNorthUp
    • it does nothing in tilted or topDownHeadingUp

Is this a bug in the native iOS library?
Any idea how to fix this?

Expected vs Actual Behavior

Click on a button (re-center / compass) should always do something :)

Code Sample

  Future<void> _startGuidedNavigation() async {
    assert(_navigationViewController != null);
    if (!_navigatorInitialized) {
      await _initializeNavigator();
    }
    await _navigationViewController?.setNavigationUIEnabled(true);
    await _startGuidance();
    // test 1 : await _navigationViewController?.followMyLocation(CameraPerspective.tilted);
    // test 2 : await _navigationViewController?.followMyLocation(CameraPerspective.topDownNorthUp);
    // test 3 : await _navigationViewController?.followMyLocation(CameraPerspective.topDownHeadingUp);
  }

Additional Context

No response

Metadata

Metadata

Assignees

Labels

triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions