MSFRoutingResult

Objective-C


@interface MSFRoutingResult : NSObject {
  void *swigCPtr;
  BOOL swigCMemOwn;
}

Swift

class MSFRoutingResult : NSObject

A class that defines list of routing actions and path geometry.

  • Checks if this object is equal to the specified object.

    Declaration

    Objective-C

    - (BOOL)isEqual:(id)object;

    Swift

    func isEqual(_ object: Any!) -> Bool

    Parameters

    object

    The reference object.

    Return Value

    True when objects are equal, false otherwise.

  • Returns the hash value of this object.

    Declaration

    Objective-C

    - (NSUInteger)hash;

    Swift

    func hash() -> UInt

    Return Value

    The hash value of this object.

  • Constructs a new RoutingResult instance from projection, points and instructions.

    Declaration

    Objective-C

    - (id)initWithProjection:(MSFProjection *)projection
                      points:(MSFMapPosVector *)points
                instructions:(MSFRoutingInstructionVector *)instructions
                   rawResult:(NSString *)rawResult;

    Swift

    init!(projection: MSFProjection!, points: MSFMapPosVector!, instructions: MSFRoutingInstructionVector!, rawResult: String!)

    Parameters

    projection

    The projection of the routing result (same as the request).

    points

    The point list defining the routing path. Instructions refer to this list.

    instructions

    The turn-by-turn instruction list.

  • Returns the projection of the points in the result.

    Declaration

    Objective-C

    - (MSFProjection *)getProjection;

    Swift

    func getProjection() -> MSFProjection!

    Return Value

    The projection of the result.

  • Returns the point list of the result. The list contains all the points the route must pass in correct order.

    Declaration

    Objective-C

    - (MSFMapPosVector *)getPoints;

    Swift

    func getPoints() -> MSFMapPosVector!

    Return Value

    The point list of the path.

  • Returns the turn-by-turn instruction list.

    Declaration

    Objective-C

    - (MSFRoutingInstructionVector *)getInstructions;

    Swift

    func getInstructions() -> MSFRoutingInstructionVector!

    Return Value

    The turn-by-turn instruction list.

  • Returns the number of turn-by-turn instructions.

    Declaration

    Objective-C

    - (int)getInstructionCount;

    Swift

    func getInstructionCount() -> Int32

    Return Value

    The number of instructions in the list.

  • Returns every turn-by-turn instruction as one JSON array.

    A maneuver is nine scalars, and reading them one instruction at a time costs a call per field: a mountain route has hundreds. The keys are the property names (action, pointIndex, streetName, instruction, turnAngle, azimuth, distance, time), and action is the enum’s constant name.

    Declaration

    Objective-C

    - (NSString *)getInstructionsJSON;

    Swift

    func getInstructionsJSON() -> String!

    Return Value

    The instruction list as JSON.

  • Returns the number of points in the path.

    Declaration

    Objective-C

    - (int)getPointCount;

    Swift

    func getPointCount() -> Int32

    Return Value

    The number of points in the path.

  • Returns the total distance of the path.

    Declaration

    Objective-C

    - (double)getTotalDistance;

    Swift

    func getTotalDistance() -> Double

    Return Value

    The total distance in meters.

  • Returns the approximate total duration of the path.

    Declaration

    Objective-C

    - (double)getTotalTime;

    Swift

    func getTotalTime() -> Double

    Return Value

    The total duration in seconds.

  • Returns raw result

    Declaration

    Objective-C

    - (NSString *)getRawResult;

    Swift

    func getRawResult() -> String!
  • Creates a string representation of this result object, useful for logging.

    Declaration

    Objective-C

    - (NSString *)description;

    Swift

    func description() -> String!

    Return Value

    The string representation of this result object.

  • Undocumented

    Declaration

    Objective-C

    -(void)dealloc;

    Swift

    func dealloc()