mapbox / mapbox/mapbox-navigation-ios

User puck should rotate according to heading, not course

Open
#4,069 4 comments 0 reactions 1 assignee View on GitHub

@jill-cardamon is already working on this.

Since Aug 22, 2022.

bug jira-sync-complete topic: location UI
Dominant language
Swift
Stars
918
Forks
326
Avg merge
1h 16m
Merged PRs (30d)
3

Description

When following a walking route, the user puck should rotate according to the heading (the direction the device is facing), not the course (the direction in which the device is moving). Currently it always rotates according to the course, regardless of the routing profile:

https://github.com/mapbox/mapbox-navigation-ios/blob/793a34f2f24c9e4eaec2f94079b245cc717b20f2/Sources/MapboxNavigation/NavigationMapView.swift#L906

We should set LocationOptions.puckBearingSource to PuckBearingSource.heading when the current route’s profile identifier is walking. Unfortunately, this option is being set inside NavigationMapView, which doesn’t have much context about the route. We could set it based on one of the routes in routes, but maybe NavigationViewController should override it based on what it knows the current route to be.

The correct behavior for walking navigation was introduced in #3620, but it effectively regressed in #3123 when we delegated the responsibility for updating the puck’s location and direction to the map SDK without setting the puck bearing source.

/ref mapbox/mapbox-maps-ios#428
/cc @mapbox/navigation-ios @jinny-nam

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.