TKDirectionsQuery

@interface TKDirectionsQuery : NSObject

A query object used for fetching direction data.

  • Mode of transport.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) TKDirectionMode mode;

    Swift

    var mode: TKDirectionMode { get set }
  • Source location where to calculate the directions from.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) CLLocation *_Nonnull sourceLocation;

    Swift

    var sourceLocation: CLLocation { get }
  • Destination location where to calculate the directions to.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) CLLocation *_Nonnull destinationLocation;

    Swift

    var destinationLocation: CLLocation { get }
  • Waypoints along the calculated route.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable)
        NSArray<CLLocation *> *waypoints;

    Swift

    var waypoints: [CLLocation]? { get set }
  • Optional cases of the route to avoid.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) TKDirectionAvoidOption avoidOption;

    Swift

    var avoidOption: TKDirectionAvoidOption { get set }
  • Departure date to use for calculation.

    Note

    Timezone will be ignored; date and time values of the given time will be taken as local.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSDate *relativeDepartureDate;

    Swift

    var relativeDepartureDate: Date? { get set }
  • Arrival date to use for calculation.

    Note

    Timezone will be ignored; date and time values of the given time will be taken as local.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSDate *relativeArrivalDate;

    Swift

    var relativeArrivalDate: Date? { get set }
  • Calculated string key for caching purposes.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull cacheKey;

    Swift

    var cacheKey: String { get }
  • Default initializer.

    Declaration

    Objective-C

    + (nullable instancetype)queryFromLocation:(nonnull CLLocation *)sourceLocation
                                    toLocation:
                                        (nonnull CLLocation *)destinationLocation;

    Swift

    convenience init?(from sourceLocation: CLLocation, to destinationLocation: CLLocation)