VMMSWaypathSegment
@interface 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
Swift
- (instancetype)initWithOptions:(VMMSTurnByTurnDirectionOptions *)options;
Parameters
options
options to use for generating directions
Return Value
a new instance of this object
-
Creates a new instance of this object
Declaration
Swift
- (instancetype)initWithWaypoint:(VMMSWaypoint *)wp andDirection:(VMMSDirectionIndicator *)direction andOptions:(VMMSTurnByTurnDirectionOptions *)options;
Parameters
wp
the staring waypoint for this segment
direction
the direction that this segment is relative to the previous one
options
options to use for generating directions
Return Value
a new instance of this object
-
Adds a new waypoint to the end of this segmment
Declaration
Swift
- (void)addWaypoint:(VMMSWaypoint *)wp;
Parameters
wp
the waypoint to add
-
Adds a segment to the end of the current segment
Declaration
Swift
- (void)addSegment:(VMMSWaypathSegment *)segment;
Parameters
segment
the segment to combine with this one
-
Generates the directions that will be used to describe this segment of the path
Declaration
Swift
- (VMMSMapDirectionStep *)createStepUsingLastSegment:(VMMSWaypathSegment *)last withCustomInfo:(VMMSCustomMapInfo *)info;
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
Swift
- (NSMutableString *)generateTurningInstructionsWithLastSegment: (VMMSWaypathSegment *)last;
Parameters
last
the 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
Swift
@property (readonly, nonatomic) double segmentLength;
-
The length of the segment, rounded to the nearest multiple of directionDistanceIncrement, in FEET
Declaration
Swift
@property (readonly, nonatomic) int roundedSegmentLength;
-
The number of waypoints in this segment. The minimum possible number is two.
Declaration
Swift
@property (readonly, nonatomic) int waypointCount;
-
The floor number of the building that this segment is located on.
Declaration
Swift
@property (readonly, nonatomic) int floor;
-
The floor id of the VMMSBaseBuildingFloor that this segment is located on
Since
1.1Declaration
Swift
@property (readonly, nonatomic) NSString *floorId;
-
The last waypoint in this segment
Declaration
Swift
@property (readonly, nonatomic) VMMSWaypoint *lastWaypoint;
-
The second to last waypoint in this segment
Declaration
Swift
@property (readonly, nonatomic) VMMSWaypoint *secondToLastWaypoint;
-
A list of all the waypoints that make up this segment.
Declaration
Swift
@property (readonly, nonatomic) NSMutableArray<VMMSWaypoint *> *waypoints;
-
A list of directions used when generating this segment.
Declaration
Swift
@property (readwrite, strong, nonatomic) NSMutableArray<VMMSDirectionIndicator *> *directions;
-
A list of the landmarks that were identified when creating text directions for this segment
Declaration
Swift
@property (readwrite, strong, nonatomic) NSArray<VMMSWaypoint *> *landmarks;
-
The options to use when generating the directions for this segment
Declaration
Swift
@property (readwrite, strong, nonatomic) VMMSTurnByTurnDirectionOptions *options;
-
Indicates that this segment is the first segment in the overall waypath.
Declaration
Swift
@property (assign, readwrite, nonatomic) BOOL isFirst;
-
Indicates that this is the last segment in the overall path.
Declaration
Swift
@property (assign, readwrite, nonatomic) BOOL isLast;
-
If a segment is not important, it will have a parent segment. Not all segments will have a parent.
Declaration
Swift
@property (readwrite, nonatomic) VMMSWaypathSegment *parentSegment;