SITDirectionsRequest

Objective-C

@interface SITDirectionsRequest : NSObject <SITMapperProtocol>

Swift

class SITDirectionsRequest : NSObject, SITMapperProtocol

Parameters to request a route with SITDirectionsManager.

Initializers

  • Constructor.

    Declaration

    Objective-C

    - (instancetype _Nonnull)initWithLocation:(SITLocation *_Nonnull)location
                              withDestination:(SITPoint *_Nonnull)destination;

    Swift

    init(location: SITLocation, withDestination destination: SITPoint)

    Parameters

    location

    SITLocation object (usually an object provided by SITLocationManager).

    destination

    the end point of the route.

    Return Value

    initialized object.

  • Constructor.

    Declaration

    Objective-C

    - (instancetype _Nonnull)initWithOrigin:(SITPoint *_Nonnull)origin
                            withDestination:(SITPoint *_Nonnull)destination;

    Swift

    init(origin: SITPoint, withDestination destination: SITPoint)

    Parameters

    origin

    initial point of the route.

    destination

    the end point of the route.

    Return Value

    initialized object.

Properties

  • Identifier of the request. (You should not fill this property, it will be completed automatically for you).

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSInteger requestID;

    Swift

    var requestID: Int { get }
  • Initial point of the route (Outdoor points are not allowed for now. Both origin and destination should belong to the same building).

    Declaration

    Objective-C

    @property (nonatomic, readonly) SITPoint *_Nonnull origin;

    Swift

    var origin: SITPoint { get }
  • Destination point of the route (Outdoor points are not allowed for now. Both origin and destination should belong to the same building).

    Declaration

    Objective-C

    @property (nonatomic, readonly) SITPoint *_Nonnull destination;

    Swift

    var destination: SITPoint { get }
  • Additional options to be considered when computing a route. You can use the following keys to modify the behaviour of computing a route: key: accessible -> BOOL value that indicates if route has to be suitable for wheel chairs (YES) or not (NO) (this is the default case) key: minimizeFloorChanges -> BOOL value that indicates if the route should have as less floor changes as possible

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSDictionary *_Nullable options;

    Swift

    var options: [AnyHashable : Any]? { get }

Methods

  • Setter for the accessibility mode option. This should be used to request an accessible route for handicaped users or to avoid using accessible floor changes.

    Declaration

    Objective-C

    - (void)setAccessibility:(SITAccessibilityMode)accessibility;

    Swift

    func setAccessibility(_ accessibility: SITAccessibilityMode)

    Parameters

    accessibility

    SITAccessibilityMode indicates the accessibility mode.

  • Setter for the minimize floor changes option. This should be used to request a route with the minimun possible amount of floor changes.

    Declaration

    Objective-C

    - (void)setMinimizeFloorChanges:(BOOL)minimizeFloorChanges;

    Swift

    func setMinimizeFloorChanges(_ minimizeFloorChanges: Bool)

    Parameters

    minimizeFloorChanges

    Boolean indicating if the route should minimize the amount of floor changes.

  • Getter for the minimize floor changes option.

    Declaration

    Objective-C

    - (BOOL)minimizeFloorChanges;

    Swift

    func minimizeFloorChanges() -> Bool

Deprecated

  • Deprecated

    Use - initWithLocation:withDestination:

    Constructor. This method is now deprecated, please consider using:

    • (instancetype) initWithLocation:(SITLocation*)location withDestination:(SITPoint*)destination;

    Declaration

    Objective-C

    - (instancetype _Nonnull)initWithRequestID:(NSInteger)requestID
                                      location:(SITLocation *_Nonnull)location
                                   destination:(SITPoint *_Nonnull)destination
                                       options:(NSDictionary *_Nullable)options;

    Swift

    init(requestID: Int, location: SITLocation, destination: SITPoint, options: [AnyHashable : Any]? = nil)

    Parameters

    requestID

    should be empty (0).

    location

    SITLocation object (usually an object provided by SITLocationManager).

    destination

    the end point of the route.

    options

    additional parameters to modify the internal behaviour of the route (see options).

    Return Value

    initialized object.

  • Deprecated

    Use - initWithOrigin:withDestination:

    Constructor. This method is now deprecated, please consider using:

    • (instancetype) initWithOrigin:(SITPoint*)origin withDestination:(SITPoint*)destination.

    Declaration

    Objective-C

    - (instancetype _Nonnull)initWithRequestID:(NSInteger)requestID
                                        origin:(SITPoint *_Nonnull)origin
                                   destination:(SITPoint *_Nonnull)destination
                                       options:(NSDictionary *_Nullable)options;

    Swift

    init(requestID: Int, origin: SITPoint, destination: SITPoint, options: [AnyHashable : Any]? = nil)

    Parameters

    requestID

    requestID should be empty (0).

    origin

    initial point of the route.

    destination

    the end point of the route.

    options

    additional parameters to modify the internal behaviour of the route (see options).

    Return Value

    initialized object.

  • Deprecated

    Use - setAccessibility:(SITAccessibility) accessibility instead

    Setter for the accessible option. This should be used to request an accessible route for handicaped users.

    Declaration

    Objective-C

    - (void)setAccessible:(BOOL)isAccessible;

    Swift

    func setAccessible(_ isAccessible: Bool)

    Parameters

    isAccessible

    Boolean indicating if the route should be accessible for all users.