SITNavigationInterface
Objective-C
@protocol SITNavigationInterface <NSObject>
Swift
protocol SITNavigationInterface : NSObjectProtocol
Interface that every object that provides navigation must implement.
-
Set the navigation parameters to receive navigation updates.
Declaration
Objective-C
- (void)requestNavigationUpdates:(SITNavigationRequest *_Nonnull)request;
Swift
func requestNavigationUpdates(_ request: SITNavigationRequest)
Parameters
request
SITNavigationRequest object.
-
Request navigation updates. Use this method to make the sdk calculate the route for you and automatically start the navigation when the route is obtained. To do that you will need to provide the directionsRequest options.
Declaration
Objective-C
- (void) requestNavigationUpdates:(SITNavigationRequest *_Nonnull)navigationRequest directionsRequest:(SITDirectionsRequest *_Nonnull)directionsRequest completion:(SITDirectionsCompletion _Nullable)completion;
Swift
func requestNavigationUpdates(_ navigationRequest: SITNavigationRequest, directionsRequest: SITDirectionsRequest) async throws -> SITRoute
Parameters
navigationRequest
SITNavigationRequest object.
directionsRequest
SITDirectionsRequest object.
completion
SITDirectionsCompletion object, where the calculate route will be provided.
-
Deprecated
This method is no longer needed as the progress is automatically computed when a new location is generated.
Update the current location to compute the progress of a user with respect to a route.
Declaration
Objective-C
- (void)updateWithLocation:(SITLocation *_Nonnull)location;
Swift
func update(with location: SITLocation)
Parameters
location
current location. You should introduced the locations provided by the SITLocationManager through its delegate interface.
-
Stops providing navigation updates and deletes
Declaration
Objective-C
- (void)removeUpdates;
Swift
func removeUpdates()
-
Check if navigation manager is locaded with a valid request
Declaration
Objective-C
- (BOOL)isRunning;
Swift
func isRunning() -> Bool
Return Value
boolean value that determines if the SITNavigationManager is loaded with a valid request (YES) or not (NO)
-
For internal use only
Declaration
Objective-C
- (void)updateNavigationState: (SITExternalNavigation *_Nonnull)externalNavigation;
Swift
func updateNavigationState(_ externalNavigation: SITExternalNavigation)