VMMSWaypathSegment

Objective-C

@interface VMMSWaypathSegment : NSObject

Swift

class VMMSWaypathSegment : NSObject

Indicates a section of the overall waypath that the user will take along their way from the start to the end of the journey

Since

1.0

Initializers

Public Methods

  • Adds a new waypoint to the end of this segmment

    Declaration

    Objective-C

    - (void)addWaypoint:(nonnull VMMSWaypoint *)wp;

    Swift

    func addWaypoint(_ wp: VMMSWaypoint)

    Parameters

    wp

    the waypoint to add

  • Adds a segment to the end of the current segment

    Declaration

    Objective-C

    - (void)addSegment:(nonnull VMMSWaypathSegment *)segment;

    Swift

    func add(_ segment: VMMSWaypathSegment)

    Parameters

    segment

    the segment to combine with this one

  • Generates the directions that will be used to describe this segment of the path

    Declaration

    Objective-C

    - (nonnull VMMSMapDirectionStep *)
        createStepUsingLastSegment:(nonnull VMMSWaypathSegment *)last
                    withCustomInfo:(nonnull VMMSCustomMapInfo *)info;

    Swift

    func createStep(usingLast last: VMMSWaypathSegment, withCustomInfo info: VMMSCustomMapInfo) -> VMMSMapDirectionStep

    Parameters

    last

    the previous segment on the path

    info

    custom labeling info

    Return Value

    the directions that represent this segment

  • Generates the initial prefix for the direction that tells which direction(s) to turn relative to the previous segment on the path

    Declaration

    Objective-C

    - (nonnull NSMutableString *)generateTurningInstructionsWithLastSegment:
        (nonnull VMMSWaypathSegment *)last;

    Swift

    func generateTurningInstructions(withLast last: VMMSWaypathSegment) -> NSMutableString

    Parameters

    last

    the previous segment on the path

    Return Value

    the initial prefix that indicates which direction(s) to turn

Public Properties

  • The raw length of the segment, in meters

    Declaration

    Objective-C

    @property (nonatomic, readonly) double segmentLength;

    Swift

    var segmentLength: Double { get }
  • The length of the segment, rounded to the nearest multiple of directionDistanceIncrement, in FEET

    Declaration

    Objective-C

    @property (nonatomic, readonly) int roundedSegmentLength;

    Swift

    var roundedSegmentLength: Int32 { get }
  • The number of waypoints in this segment. The minimum possible number is two.

    Declaration

    Objective-C

    @property (nonatomic, readonly) int waypointCount;

    Swift

    var waypointCount: Int32 { get }
  • The floor number of the building that this segment is located on.

    Declaration

    Objective-C

    @property (nonatomic, readonly) int floor;

    Swift

    var floor: Int32 { get }
  • The floor id of the VMMSBaseBuildingFloor that this segment is located on

    Since

    1.1

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull floorId;

    Swift

    var floorId: String { get }
  • The last waypoint in this segment

    Declaration

    Objective-C

    @property (nonatomic, readonly) VMMSWaypoint *_Nonnull lastWaypoint;

    Swift

    var lastWaypoint: VMMSWaypoint { get }
  • The second to last waypoint in this segment

    Declaration

    Objective-C

    @property (nonatomic, readonly) VMMSWaypoint *_Nonnull secondToLastWaypoint;

    Swift

    var secondToLastWaypoint: VMMSWaypoint { get }
  • A list of all the waypoints that make up this segment.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSMutableArray<VMMSWaypoint *> *_Nonnull waypoints;

    Swift

    var waypoints: NSMutableArray { get }
  • A list of directions used when generating this segment.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSMutableArray<VMMSDirectionIndicator *> *_Nonnull directions;

    Swift

    var directions: NSMutableArray { get set }
  • A list of the landmarks that were identified when creating text directions for this segment

    Declaration

    Objective-C

    @property (nonatomic, strong) NSArray<VMMSWaypoint *> *_Nonnull landmarks;

    Swift

    var landmarks: [VMMSWaypoint] { get set }
  • The options to use when generating the directions for this segment

    Declaration

    Objective-C

    @property (nonatomic, strong) VMMSTurnByTurnDirectionOptions *_Nonnull options;

    Swift

    var options: VMMSTurnByTurnDirectionOptions { get set }
  • Indicates that this segment is the first segment in the overall waypath.

    Declaration

    Objective-C

    @property (nonatomic) BOOL isFirst;

    Swift

    var isFirst: Bool { get set }
  • Indicates that this is the last segment in the overall path.

    Declaration

    Objective-C

    @property (nonatomic) BOOL isLast;

    Swift

    var isLast: Bool { get set }
  • If a segment is not important, it will have a parent segment. Not all segments will have a parent.

    Declaration

    Objective-C

    @property (nonatomic, weak) VMMSWaypathSegment *_Nullable parentSegment;

    Swift

    weak var parent: VMMSWaypathSegment? { get set }