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-
Creates a new instance of this object
Declaration
Objective-C
- (nonnull instancetype)initWithOptions: (nonnull VMMSTurnByTurnDirectionOptions *)options;Swift
init(options: VMMSTurnByTurnDirectionOptions)Parameters
optionsoptions to use for generating directions
Return Value
a new instance of this object
-
Creates a new instance of this object
Declaration
Objective-C
- (nonnull instancetype) initWithWaypoint:(nullable VMMSWaypoint *)wp andDirection:(nullable VMMSDirectionIndicator *)direction andOptions:(nonnull VMMSTurnByTurnDirectionOptions *)options;Swift
init(waypoint wp: VMMSWaypoint?, andDirection direction: VMMSDirectionIndicator?, andOptions options: VMMSTurnByTurnDirectionOptions)Parameters
wpthe staring waypoint for this segment
directionthe direction that this segment is relative to the previous one
optionsoptions to use for generating directions
Return Value
a new instance of this object
-
Adds a new waypoint to the end of this segmment
Declaration
Objective-C
- (void)addWaypoint:(nonnull VMMSWaypoint *)wp;Swift
func addWaypoint(_ wp: VMMSWaypoint)Parameters
wpthe 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
segmentthe 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) -> VMMSMapDirectionStepParameters
lastthe previous segment on the path
infocustom 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) -> NSMutableStringParameters
lastthe previous segment on the path
Return Value
the initial prefix that indicates which direction(s) to turn
-
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.1Declaration
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 }
VMMSWaypathSegment Class Reference