mapbox / mapbox/mapbox-navigation-ios

[Bug]: Maneuver arrows mirror via imageOrientation only, so CarPlay draws left turns pointing right

Open
#4,850 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Swift
Stars
918
Forks
326
Avg merge
1h 16m
Merged PRs (30d)
3

Description

### Mapbox Navigation SDK version

3.25.1

### Steps to reproduce

1. Show CarPlay maneuvers the way `CarPlayNavigationViewController` does, by assigning
`CPManeuver.symbolSet `from `VisualInstruction.maneuverImageSet(side:visualInstruction:)`,
or `CPManeuver.symbolImage` from an equivalent `ManeuverView` snapshot.
2. Navigate a route containing a left turn, in a country that drives on the right.
3. Look at the maneuver symbol in the CarPlay guidance card.

Measured on a physical head unit, iOS 26, SDK 3.25.1.

### Expected behavior

The CarPlay maneuver symbol points in the direction of the maneuver.

For a `VisualInstruction` with `maneuverDirection == .left`, the arrow in the
CarPlay guidance card points left.

### Actual behavior

The arrow points right. Left and right are swapped for every maneuver that `ManeuverView` renders by mirroring:

- .left / .slightLeft / .sharpLeft
- U-turns where drivingSide == .right
- roundabouts and rotaries where drivingSide == .left

Right turns, straight-ahead and arrivals are unaffected.

The map, the banner text and the spoken instruction are all correct at the same
time. Only the CarPlay symbol is wrong, which makes it easy to miss: the driver
is told "turn left", the route line turns left, and the icon in the corner
points right.

Only the snapshot path is affected. The in-app banner uses `ManeuverView` as a
live subview and looks correct. The CarPlay symbol comes from a `UIImage`
snapshot of the same view, and that is where the mirroring is lost.

### Is this a one-time issue or a repeatable issue?

repeatable

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at CarPlayNavigationViewController and trace VisualInstruction.maneuverImageSet(side:visualInstruction:) into the CPManeuver symbol snapshot path, comparing it with the live ManeuverView behavior. Reproduce a left turn and the listed driving-side cases on CarPlay, then verify that snapshot symbols point in the same direction as the maneuver and that unaffected symbols remain unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.