RouteSegment class Route

A single portion of a computed route between two consecutive waypoints.

A RouteSegment exposes endpoints (waypoints), geometry, time/distance metrics, geographic bounds and a list of RouteInstruction objects that describe the step-by-step guidance for that segment. Segments are produced by the routing engine and should be obtained from a parent Route via Route.segments.

Segments may include toll sections, flags and geographic metadata useful for rendering or measurement.

When a segment represents a public transport section, a segment is the portion of the route traveled using a specific public transport vehicle or pedestrian. See the toPTRouteSegment method to convert to a PTRouteSegment providing PT-specific properties.

When a segment represents other specialized transport modes, a segment is the portion of the route traveled between two waypoints.

See also:

Inheritance

Properties

countrySections → List<CountrySection>
The countries this segment runs through.
no setterinherited
ferrySections → List<FerrySection>
Sections contained in this segment on which the vehicle is carried over.
no setterinherited
geographicArea → RectangleGeographicArea
Geographic bounding rectangle that encloses this segment.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
hasRegisteredAutoReleaseObject ↔ bool
getter/setter pairinherited
incursCosts → bool
Whether traveling this segment may incur monetary costs (for example tolls).
no setterinherited
instructions → List<RouteInstruction>
Turn-by-turn instructions for this segment.
no setterinherited
isCommon → bool
Whether this segment is of the same travel mode as the parent route.
no setterinherited
pointerId → int
The pointer ID of the native object
no setterinherited
restrictionSections → List<RestrictionSection>
Restricted sections contained in this segment.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
summary → String
Short textual summary of the segment (distance/time snippet).
no setterinherited
timeDistance → TimeDistance
Duration and distance metrics for this segment.
no setterinherited
tollSections → List<TollSection>
Tolled sections contained in this segment.
no setterinherited
waypoints → List<Landmark>
List containing the segment's start, end and any intermediate waypoints.
no setterinherited

Methods

dispose() → void
Disposes the native object.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerAutoReleaseObject(int pointerId) → void
Registers an object for auto release.
inherited
toPTRouteSegment() → PTRouteSegment?
Converts this segment into a PTRouteSegment when it represents a public-transport segment.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited