Segment Class
Segment Class
Contains the calculated itinerary for one segment of a route; that is, from one waypoint up to, but not including, the subsequent waypoint. Includes the waypoint, array of directions, map views, and summary information (such as trip time, driving time, and distance).
Public Class Segment Inherits System.Object
[C#]
public class Segment : System.Object
Public Properties
Name | Description |
---|---|
Directions | The array of instructions (Direction[] objects) that make up the itinerary for the specified route segment. |
Distance | The distance of the specified route segment, in distance units (DistanceUnit enumeration) as specified in the UserInfoRouteHeader.DefaultDistanceUnit property. |
DrivingTime | The total driving time for a route segment in seconds. |
TripTime | The total amount of travel time for a route segment in seconds. |
View | The map view representations (MapViewRepresentations object) for the route segment. Contains the view by bounding rectangle coordinates, and the view by latitude and longitude coordinates of the center point, height, and width. |
Waypoint | The waypoint (Waypoint object) for the route segment; that is, the beginning of the segment. |
Remarks
The Segment object is used on output in the RouteItinerary.Segments property, which is returned in the Route.Itinerary property from the CalculateRoute and CalculateSimpleRoute methods of the RouteServiceSoap class.
A route can have up to 50 waypoints, and hence up to 50 Segment objects.
See Also
Direction Class | Waypoint Class | RouteItinerary.Segments Property | Route.Itinerary Property | RouteServiceSoap Class