RouteSegmentObject

Objective-C


@interface RouteSegmentObject : NSObject

Swift

class RouteSegmentObject : NSObject

This class encapsulates route segment information.

  • Initializes and returns a newly allocated object using the model data.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithModelData:(nonnull void *)data;
  • Returns the model data.

    Declaration

    Objective-C

    - (nonnull void *)getModelData;
  • Returns the list of waypoints. @details The waypoints are ordered like: departure, first waypoint, …, destination. Only the route can have intermediate waypoints. The segments have only departure and destination.

    Declaration

    Objective-C

    - (nonnull NSArray<LandmarkObject *> *)getWaypoints;

    Swift

    func getWaypoints() -> [LandmarkObject]
  • Returns the length in meters and estimated travel time in seconds for the route segment.

    Declaration

    Objective-C

    - (nullable TimeDistanceObject *)getTimeDistance;

    Swift

    func getTimeDistance() -> TimeDistanceObject?
  • Returns the geographic area of the route. The geographic area is the smallest rectangle that can be drawn around the route.

    Declaration

    Objective-C

    - (nullable RectangleGeographicAreaObject *)getGeographicArea;

    Swift

    func getGeographicArea() -> RectangleGeographicAreaObject?
  • Returns true if traveling the route or route segment incurs cost to the user.

    Declaration

    Objective-C

    - (BOOL)getIncursCosts;

    Swift

    func getIncursCosts() -> Bool
  • Returns the summary of the route segment.

    Declaration

    Objective-C

    - (nonnull NSString *)getSummary;

    Swift

    func getSummary() -> String
  • Returns the route instructions list.

    Declaration

    Objective-C

    - (nonnull NSArray<RouteInstructionObject *> *)getInstructions;

    Swift

    func getInstructions() -> [RouteInstructionObject]
  • Returns the public transit route instructions list.

    Declaration

    Objective-C

    - (nonnull NSArray<PTRouteInstructionObject *> *)getPTInstructions;

    Swift

    func getPTInstructions() -> [PTRouteInstructionObject]
  • Returns true if route segment is common. @details A common type route segment has the same travel mode as the parent route. @details E.g. a walk segment in a public transport route has isCommon = false

    Declaration

    Objective-C

    - (BOOL)isCommon;

    Swift

    func isCommon() -> Bool