Skip to content

Commit 9e8edb3

Browse files
committed
set the default puck bearing source as location course
1 parent 7732666 commit 9e8edb3

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

Sources/MapboxNavigation/NavigationMapView.swift

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -172,21 +172,12 @@ open class NavigationMapView: UIView {
172172
}
173173
}
174174

175-
var simulatesLocation: Bool = true {
176-
didSet {
177-
if simulatesLocation {
178-
mapView.location.options.puckBearingSource = .course
179-
180-
} else {
181-
mapView.location.options.puckBearingSource = .heading
182-
}
183-
}
184-
}
175+
var simulatesLocation: Bool = true
185176

186177
/**
187178
Specifies how the map displays the user’s current location, including the appearance and underlying implementation.
188179

189-
By default, this property is set to `UserLocationStyle.courseView`.
180+
By default, this property is set to `UserLocationStyle.courseView`, the bearing source is location course.
190181
*/
191182
public var userLocationStyle: UserLocationStyle = .courseView(UserPuckCourseView(frame: CGRect(origin: .zero, size: 75.0))) {
192183
didSet {
@@ -271,7 +262,7 @@ open class NavigationMapView: UIView {
271262
self.mapView.location.options.puckType = .puck3D(configuration)
272263
}
273264
}
274-
mapView.location.options.puckBearingSource = simulatesLocation ? .course : .heading
265+
mapView.location.options.puckBearingSource = .course
275266
}
276267

277268
deinit {

0 commit comments

Comments
 (0)