You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A roundabout icon in a region that drives on the left should depict a clockwise movement, but instead it always depicts a counterclockwise movement; the icon is horizontally flipped.
#2044 attempted to fix this and some related issues by flipping the icon when the maneuver modifier is slight left, left, or sharp left:
if (STEP_MANEUVER_MODIFIER_LEFT.equals(drivingSide) && STEP_MANEUVER_MODIFIER_UTURN.contains(maneuverModifier)) {
setScaleX(flip ? 1 : -1);
} else {
setScaleX(flip ? -1 : 1);
}
}
While this heuristic is correct for most maneuver types, it’s incorrect for roundabout maneuvers. By default, the navigation SDK sets roundabout_exits=true in the Directions API request, producing two maneuvers, one for entering the roundabout and the other for exiting it. In a region that drives on the left, you make a slight left turn to enter the roundabout and another slight left turn to exit it. These slight left turns are reflected in the two maneuvers’ modifiers.
On iOS, we use this heuristic that works well: for a roundabout, rotary, or roundabout turn maneuver, flip the image horizontally if and only if the driving side is left. The driving side is the only determining factor for circular junctions; the modifier is irrelevant.
A roundabout icon in a region that drives on the left should depict a clockwise movement, but instead it always depicts a counterclockwise movement; the icon is horizontally flipped.
#2044 attempted to fix this and some related issues by flipping the icon when the maneuver modifier is slight left, left, or sharp left:
mapbox-navigation-android/libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/instruction/maneuver/ManeuverView.java
Lines 238 to 244 in 2aa1316
While this heuristic is correct for most maneuver types, it’s incorrect for roundabout maneuvers. By default, the navigation SDK sets
roundabout_exits=true
in the Directions API request, producing two maneuvers, one for entering the roundabout and the other for exiting it. In a region that drives on the left, you make a slight left turn to enter the roundabout and another slight left turn to exit it. These slight left turns are reflected in the two maneuvers’ modifiers.On iOS, we use this heuristic that works well: for a
roundabout
,rotary
, orroundabout turn
maneuver, flip the image horizontally if and only if the driving side isleft
. The driving side is the only determining factor for circular junctions; the modifier is irrelevant./ref #396
/cc @mapbox/navigation-android
The text was updated successfully, but these errors were encountered: