AI-generated Key Takeaways
-
RouteSegment
is an immutable class representing a single leg of a journey, including traffic data. -
It provides access to the destination's LatLng and Waypoint, the list of LatLngs forming the segment, and traffic information.
-
getDestinationLatLng
returns the final LatLng, which might differ from the Waypoint location if it's not directly on a road. -
The segment's LatLngs, destination Waypoint, and associated traffic data are accessible via dedicated methods.
A RouteSegment is an immutable class which represents a single "leg" of a journey, either from
the device's current position to the destination, or from one destination to a subsequent
destination, along with NavigationTrafficData
along the segment.
Public Method Summary
abstract LatLng |
getDestinationLatLng()
The final LatLng in this segment.
|
abstract Waypoint |
getDestinationWaypoint()
The destination waypoint associated with this segment of the route.
|
abstract List<LatLng> |
getLatLngs()
The list of LatLngs making up the segment.
|
abstract NavigationTrafficData |
getTrafficData()
The traffic data associated with this segment of the route.
|
Public Methods
public abstract LatLng getDestinationLatLng ()
The final LatLng in this segment. Note that this will in general not be the same location as the destination Waypoint, unless the Waypoint is positioned directly on a road.
public abstract Waypoint getDestinationWaypoint ()
The destination waypoint associated with this segment of the route.
public abstract NavigationTrafficData getTrafficData ()
The traffic data associated with this segment of the route.