SPDirectionsResponse

@interface SPDirectionsResponse : NSObject

Object returned by SPDirectionsManager containing information about routes.

  • Recommended constructor for SPDirectionsResponse objects.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithLocation:(nonnull SPLocation *)startLocation
                                      routes:(nonnull NSArray<SPRoute *> *)routes;

    Swift

    init(location startLocation: SPLocation, routes: [SPRoute])

    Parameters

    startLocation

    starting location for routes

    routes

    list of routes found

  • Declaration

    Objective-C

    - (nonnull SPLocation *)startLocation;

    Swift

    func startLocation() -> SPLocation

    Return Value

    starting location for routes

  • Declaration

    Objective-C

    - (nonnull NSArray<SPRoute *> *)routes;

    Swift

    func routes() -> [SPRoute]

    Return Value

    list of routes, may be an empty array