SITDirectionsInterface

Objective-C

@protocol SITDirectionsInterface <NSObject>

Swift

protocol SITDirectionsInterface : NSObjectProtocol

Protocol that describes the interface every object providing directions should conform to.

  • Call this method to receive a reference to an initialized object of this class.

    Declaration

    Objective-C

    + (instancetype _Nonnull)sharedInstance;

    Swift

    static func sharedInstance() -> Self

    Return Value

    You should always use this method to obtain the manager object and should not try to create instances directly.

  • Request to compute the route and indications from two points inside a building.

    Note

    For now, this component only process requests where origin and destination are inside indoor areas at the same building.

    Declaration

    Objective-C

    - (void)requestDirections:(SITDirectionsRequest *_Nonnull)request;

    Swift

    func requestDirections(_ request: SITDirectionsRequest)

    Parameters

    request

    object that encapsulates information about the origin and the destination of the route.

  • Request to compute the route and indications from two points inside a building.

    If you want to calculate several routes and receive the results via the callback, you will have to let the previous calculation finish before requesting a new route.

    If you use this method you don’t need to conform to the delegate pattern as you will receive the directions via the completion. However, for compatibility purposes the delegate methods will be also invoked when requesting directions with this method.

    Note

    For now, this component only process requests where origin and destination are inside indoor areas at the same building.

    Declaration

    Objective-C

    - (void)requestDirections:(SITDirectionsRequest *_Nonnull)request
                   completion:(SITDirectionsCompletion _Nullable)completion;

    Swift

    func requestDirections(_ request: SITDirectionsRequest) async throws -> SITRoute

    Parameters

    request

    object that encapsulates information about the origin and the destination of the route.

    completion

    SITDirectionsCompletion object, where the calculate route will be provided.

  • Clear all information of the requests being processed at the moment.

    Note

    This method cancel every pending SITDirectionRequest.

    Declaration

    Objective-C

    - (void)reset;

    Swift

    func reset()