Skip to content

User puck should rotate according to heading, not course #4069

Open
@1ec5

Description

@1ec5

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:

mapView.location.options.puckBearingSource = .course

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

Metadata

Metadata

Assignees

Labels

UIWork related to visual components, Android Auto, Camera, 3D, voice, etc.bugSomething isn’t workingjira-sync-completetopic: location

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions