SITDirectionsRequest
Objective-C
@interface SITDirectionsRequest : NSObject <SITMapperProtocol>
Swift
class SITDirectionsRequest : NSObject, SITMapperProtocol
Parameters to request a route with SITDirectionsManager.
-
Constructor.
Declaration
Objective-C
- (instancetype _Nonnull)initWithLocation:(SITLocation *_Nonnull)location withDestination:(SITPoint *_Nonnull)destination;Swift
init(location: SITLocation, withDestination destination: SITPoint)Parameters
locationSITLocation object (usually an object provided by SITLocationManager).
destinationthe end point of the route.
Return Value
initialized object.
-
Constructor
Declaration
Objective-C
- (instancetype _Nonnull) initWithLocation:(SITLocation *_Nonnull)origin withDestination:(SITPoint *_Nonnull)destination includedTags:(NSArray<NSString *> *_Nullable)includedTags excludedTags:(NSArray<NSString *> *_Nullable)excludedTags;Swift
init(location origin: SITLocation, withDestination destination: SITPoint, includedTags: [String]?, excludedTags: [String]?) -
Constructor.
Declaration
Objective-C
- (instancetype _Nonnull) initWithOrigin:(SITPoint *)origin withPoiToIdentifier:(NSString *_Nonnull)poiToIdentifier includedTags:(NSArray<NSString *> *_Nullable)includedTags excludedTags:(NSArray<NSString *> *_Nullable)excludedTags;Swift
init(origin: SITPoint!, withPoiToIdentifier poiToIdentifier: String, includedTags: [String]?, excludedTags: [String]?)Parameters
origininitial point of the route.
poiToIdentifierthe POI where the route will end.
includedTagsAdditional configuration that allows adjusting the computed route based on a list of tags.
excludedTagsAdditional configuration that allows adjusting the computed route based on a list of tags.
Return Value
initialized object.
-
Constructor to use when you want to request a route to a POI.
Declaration
Objective-C
- (instancetype _Nonnull) initWithLocation:(SITLocation *_Nonnull)origin withPoiToIdentifier:(NSString *_Nonnull)poiToIdentifier includedTags:(NSArray<NSString *> *_Nullable)includedTags excludedTags:(NSArray<NSString *> *_Nullable)excludedTags;Swift
init(location origin: SITLocation, withPoiToIdentifier poiToIdentifier: String, includedTags: [String]?, excludedTags: [String]?)Parameters
origininitial location of the route.
poiToIdentifierthe POI where the route will end.
includedTagsAdditional configuration that allows adjusting the computed route based on a list of tags.
excludedTagsAdditional configuration that allows adjusting the computed route based on a list of tags.
Return Value
initialized object.
-
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 } -
Destination POI of the route (Outdoor POIs are not allowed for now. Both origin and destination should belong to the same building).
Declaration
Objective-C
@property (nonatomic, strong) NSString *_Nonnull poiToIdentifier;Swift
var poiToIdentifier: String { get set } -
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
TODO: Deprecate in favor of directionOptions
Declaration
Objective-C
@property (nonatomic, readonly) NSDictionary *_Nullable options;Swift
var options: [AnyHashable : Any]? { get } -
Additional configuration that allows adjusting the computed route based on a list of tags.
In this case every string included in the list including only the usage of the tagged links of the graph on the route computation.
Declaration
Objective-C
@property (nonatomic, strong) NSArray<NSString *> *_Nullable includedTags;Swift
var includedTags: [String]? { get set } -
Additional configuration that allows adjusting the computed route based on a list of tags.
In this case every string included in the list exclude the usage of the tagged links of the graph on the route computation.
Declaration
Objective-C
@property (nonatomic, strong) NSArray<NSString *> *_Nullable excludedTags;Swift
var excludedTags: [String]? { get set }
-
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
accessibilitySITAccessibilityMode indicates the accessibility mode.
-
Getter for the accessibility mode option.
Declaration
Objective-C
- (SITAccessibilityMode)accesibilityMode;Swift
func accesibilityMode() -> SITAccessibilityMode -
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
minimizeFloorChangesBoolean 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 -
Returns wheter or not the request is well constructed
Declaration
Objective-C
- (BOOL)isValid;Swift
func isValid() -> Bool
-
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
requestIDshould be empty (0).
locationSITLocation object (usually an object provided by SITLocationManager).
destinationthe end point of the route.
optionsadditional 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
Parameters
requestIDrequestID should be empty (0).
origininitial point of the route.
destinationthe end point of the route.
optionsadditional 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
isAccessibleBoolean indicating if the route should be accessible for all users.