Skip to content

Commit 444eeb6

Browse files
committed
Added history methods to PassiveLocationDataSource
1 parent 0de61f7 commit 444eeb6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Sources/MapboxCoreNavigation/PassiveLocationDataSource.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,18 @@ open class PassiveLocationDataSource: NSObject {
147147
}
148148
NotificationCenter.default.post(name: .passiveLocationDataSourceDidUpdate, object: self, userInfo: userInfo)
149149
}
150+
151+
public func enableLocationRecording() {
152+
try! Navigator.shared.enableHistoryRecorder()
153+
}
154+
155+
public func disableLocationRecording() {
156+
try! Navigator.shared.disableHistoryRecorder()
157+
}
158+
159+
public func locationHistory() throws -> Data {
160+
return try Navigator.shared.history()
161+
}
150162
}
151163

152164
extension PassiveLocationDataSource: CLLocationManagerDelegate {

0 commit comments

Comments
 (0)