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
Copy file name to clipboardExpand all lines: Sources/MapboxCoreNavigation/NavigationService.swift
+29-12Lines changed: 29 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,9 @@ import MapboxDirections
5
5
/**
6
6
A navigation service coordinates various nonvisual components that track the user as they navigate along a predetermined route. You use `MapboxNavigationService`, which conforms to this protocol, either as part of `NavigationViewController` or by itself as part of a custom user interface. A navigation service calls methods on its `delegate`, which conforms to the `NavigationServiceDelegate` protocol, whenever significant events or decision points occur along the route.
7
7
8
-
A navigation service controls a `NavigationLocationManager` for determining the user’s location, a `Router` that tracks the user’s progress along the route, a `Directions` service for calculating new routes (only used when rerouting), and a `NavigationEventsManager` for sending telemetry events related to navigation or user feedback.
8
+
A navigation service controls a `NavigationLocationManager` for determining the user’s location, a `Router` that tracks the user’s progress along the route, a `NavigationRouter` service for calculating new routes (only used when rerouting), and a `NavigationEventsManager` for sending telemetry events related to navigation or user feedback.
9
9
10
-
`NavigationViewController` comes with a `MapboxNavigationService` by default. You may override it to customize the `Directions` service or simulation mode. After creating the navigation service, pass it into `NavigationOptions(styles:navigationService:voiceController:topBanner:bottomBanner:)`, then pass that object into `NavigationViewController(for:options:)`.
10
+
`NavigationViewController` comes with a `MapboxNavigationService` by default. You may override it to customize the `NavigationRouter`'s source service or simulation mode. After creating the navigation service, pass it into `NavigationOptions(styles:navigationService:voiceController:topBanner:bottomBanner:)`, then pass that object into `NavigationViewController(for:options:)`.
11
11
12
12
If you use a navigation service by itself, outside of `NavigationViewController`, call `start()` when the user is ready to begin navigating along the route.
13
13
*/
@@ -18,9 +18,14 @@ public protocol NavigationService: CLLocationManagerDelegate, RouterDataSource,
18
18
varlocationManager:NavigationLocationManager{get}
19
19
20
20
/**
21
-
A reference to a MapboxDirections service. Used for rerouting.
@@ -279,7 +284,8 @@ public class MapboxNavigationService: NSObject, NavigationService {
279
284
- parameter routeResponse: `RouteResponse` object, containing selection of routes to follow.
280
285
- parameter routeIndex: The index of the route within the original `RouteResponse` object.
281
286
- parameter routeOptions: The route options used to get the route.
282
-
- parameter directions: The Directions object that created `route`. If this argument is omitted, the shared value of `NavigationSettings.directions` will be used.
287
+
- parameter routingSource: `NavigationRouter` source type, used to create route.
288
+
- parameter credentials: Credentials to authorize additional data requests throughout the route. If this argument is omitted, the shared value of `NavigationSettings.directions` will be used.
283
289
- parameter locationSource: An optional override for the default `NaviationLocationManager`.
284
290
- parameter eventsManagerType: An optional events manager type to use while tracking the route.
285
291
- parameter simulationMode: The simulation mode desired.
@@ -288,13 +294,15 @@ public class MapboxNavigationService: NSObject, NavigationService {
0 commit comments