NSDK_Tour

@interface NSDK_Tour : NSObject

NSDK_Tour objects are used as a parameter for the method [NSDK_Navigation calculateTour:observer:error:]

@author PTV AG Karlsruhe

  • Unavailable

    init not available

    Don’t use this init method. Instead use initWithWayPoint:

    Declaration

    Objective-C

    - (instancetype)init;
  • initialize a Tour object with the Startpoint of the tour. In case of an error this method throws an Exception

    Declaration

    Objective-C

    - (instancetype)initWithWayPoint:(NSDK_WayPoint *)wayPoint;

    Swift

    init!(wayPoint: NSDK_WayPoint!)

    Parameters

    wayPoint

    the Startpoint of the tour

  • Load a tour from a given bcr file (only the station information will be loaded. The first station will be set to tour start, the following stations in the file will be added as target stations.)

    Declaration

    Objective-C

    - (instancetype)initWithFilename:(NSString *)fileName;

    Swift

    init!(filename fileName: String!)

    Parameters

    fileName

    the filename of the bcr file

  • initialize a Tour object with a bcr file (only the station information will be loaded. The first station will be set to tour start, the following stations in the file will be added as target stations.)

    Declaration

    Objective-C

    - (void)loadTour:(NSString *)fileName error:(NSError **)error;

    Swift

    func load(_ fileName: String!, error: NSErrorPointer)

    Parameters

    fileName

    the filename of the bcr file

    error

    contains error information, if an error occured.

  • Save a tour to a bcr file. Attention: The start station will become the first station in the file, the target stations of the tour will be added as consecutive stations. No other information except the stations will be saved.

    Declaration

    Objective-C

    - (void)saveTour:(NSString *)fileName error:(NSError **)error;

    Swift

    func save(_ fileName: String!, error: NSErrorPointer)

    Parameters

    fileName

    The name of the file to save

    error

    contains error information, if an error occured.

  • Get the start station of the tour.

    Declaration

    Objective-C

    - (NSDK_WayPoint *)getStartStation:(NSError **)error;

    Swift

    func getStartStation(_ error: NSErrorPointer) -> NSDK_WayPoint!

    Parameters

    error

    contains error information, if an error occured.

    Return Value

    The start station

  • Get a particular destination of a tour by their index. The number of destinations can be determined by calling getDestinationCount(). Accessing one particular stations is done by calling this function with the index of the destination that is wanted. If the destination station which is accessed is an SVP destination, the last SVP point of the SVP array will be returned.

    Declaration

    Objective-C

    - (NSDK_WayPoint *)getDestination:(short)index error:(NSError **)error;

    Swift

    func getDestination(_ index: Int16, error: NSErrorPointer) -> NSDK_WayPoint!

    Parameters

    index

    The index of the station in the tour

    error

    contains error information, if an error occured.

    Return Value

    The destination as a NSDK_WayPoint

  • Get the SVPs of a tour station. The SVP points will be returned as a array of NSDK_SVPWayPoint If the station identified by the index is not an SVP station, an empty array is returned and the error parameter is set

    Declaration

    Objective-C

    - (NSArray *)getDestinationSVPs:(int)index error:(NSError **)error;

    Swift

    func getDestinationSVPs(_ index: Int32, error: NSErrorPointer) -> [Any]!

    Parameters

    index

    The index of the station in the tour

    error

    contains error information, if an error occured.

    Return Value

    An array of NSDK_SVPWayPoint

  • Get the number of destinations of the tour.

    Declaration

    Objective-C

    - (int)getDestinationCount:(NSError **)error;

    Swift

    func getDestinationCount(_ error: NSErrorPointer) -> Int32

    Parameters

    error

    contains error information, if an error occured.

    Return Value

    The number of destinations

  • Get the type of a particular destination, identified by their index. There are two types of destinations:

    • Regular and
    • SVP stations

    Declaration

    Objective-C

    - (int)getDestinationType:(short)index error:(NSError **)error;

    Swift

    func getDestinationType(_ index: Int16, error: NSErrorPointer) -> Int32

    Parameters

    index

    The index of the station in the tour

    error

    contains error information, if an error occured.

    Return Value

    0 for a regular station, 1 for an SVP

  • Add a regular station to the tour object

    Declaration

    Objective-C

    - (void)addStation:(NSDK_WayPoint *)wayPoint error:(NSError **)error;

    Swift

    func addStation(_ wayPoint: NSDK_WayPoint!, error: NSErrorPointer)

    Parameters

    wayPoint

    The coordinate (and direction) of the station.

    error

    contains error information, if an error occured.

  • Add an array of regular stations to the tour object

    Declaration

    Objective-C

    - (void)addStations:(NSArray *)wayPoints error:(NSError **)error;

    Swift

    func addStations(_ wayPoints: [Any]!, error: NSErrorPointer)

    Parameters

    wayPoints

    Array of NSDK_WayPoints

    error

    contains error information, if an error occured.

  • Add SVP stations to a formerly created tour.

    An SVP station is a set of coordinates + direction which describe an approximation of a route to a destination. The navigation sdk will try to calculate a route which comes close to the provided coordinates.

    Declaration

    Objective-C

    - (void)addSVPs:(NSArray *)nsdkSVPWayPoints error:(NSError **)error;

    Swift

    func addSVPs(_ nsdkSVPWayPoints: [Any]!, error: NSErrorPointer)

    Parameters

    nsdkSVPWayPoints

    An array with the provided SVP route coordinates

    error

    contains error information, if an error occured.