public final class Route
extends java.lang.Object
GeoCoordinate. A
Route consists of a list of maneuvers and route links.RouteResult,
RouteManager| Modifier and Type | Class and Description |
|---|---|
static class |
Route.TrafficPenaltyMode
Enumeration for calculating route duration.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
WHOLE_ROUTE |
| Modifier and Type | Method and Description |
|---|---|
GeoBoundingBox |
getBoundingBox()
Gets the smallest
GeoBoundingBox that contains the entire route. |
GeoCoordinate |
getDestination()
Gets the destination coordinate for the route.
|
Maneuver |
getFirstManeuver()
Returns the first
Maneuver. |
int |
getLength()
Gets the length of the route, in meters.
|
java.util.List<Maneuver> |
getManeuvers()
Gets the list of all maneuvers that travelers will encounter along the route.
|
RouteElements |
getRouteElements() |
RouteElements |
getRouteElements(Maneuver maneuver)
Gets the
RouteElements belonging to this Maneuver. |
RouteElements |
getRouteElementsFromDuration(long duration)
Gets the
RouteElements for a given duration (in seconds) from the start of the route. |
RouteElements |
getRouteElementsFromDuration(long start,
long duration)
Gets the
RouteElements for a given duration (in seconds) within the route. |
RouteElements |
getRouteElementsFromLength(int length)
Gets the
RouteElements for a given distance (in meters) within the route. |
RouteElements |
getRouteElementsFromLength(int start,
int length)
Gets the
RouteElements for a given distance (in meters) within the route. |
java.util.List<GeoCoordinate> |
getRouteGeometry()
Gets the list of all
GeoCoordinate values
representing, in order, the polyline of the route. |
RoutePlan |
getRoutePlan()
Returns the route plan for defining a route with one or more route legs.
|
GeoCoordinate |
getStart()
Gets the starting coordinate for the route.
|
int |
getSublegCount()
Returns the number of sub-legs the route has.
|
RouteTta |
getTta(Route.TrafficPenaltyMode mode,
int subleg)
Gets the estimated time to arrival with current traffic conditions.
|
java.util.List<GeoCoordinate> |
getWaypoints()
Gets the list of all waypoints for the route.
|
public static final int WHOLE_ROUTE
public GeoBoundingBox getBoundingBox()
GeoBoundingBox that contains the entire route.GeoBoundingBoxpublic int getLength()
public java.util.List<Maneuver> getManeuvers()
Maneuver objectspublic java.util.List<GeoCoordinate> getRouteGeometry()
GeoCoordinate values
representing, in order, the polyline of the route.GeoCoordinate valuesMapPolylinepublic Maneuver getFirstManeuver()
Maneuver.Maneuver, null if there are no maneuverspublic java.util.List<GeoCoordinate> getWaypoints()
GeoCoordinate objectspublic RoutePlan getRoutePlan()
RoutePlanpublic GeoCoordinate getStart()
GeoCoordinatepublic GeoCoordinate getDestination()
GeoCoordinatepublic RouteElements getRouteElements()
public RouteElements getRouteElements(Maneuver maneuver)
RouteElements belonging to this Maneuver.maneuver - The Maneuver to get the RouteElements for.RouteElements belonging to this Maneuver.public RouteElements getRouteElementsFromDuration(long duration)
RouteElements for a given duration (in seconds) from the start of the route.duration - The number of seconds from the beginning of the route.RouteElements within the given duration.public RouteElements getRouteElementsFromDuration(long start, long duration)
RouteElements for a given duration (in seconds) within the route.start - The number of seconds into the route to start getting RouteElements.duration - The number of seconds from the given start of the route.RouteElements within the given duration.public RouteElements getRouteElementsFromLength(int length)
RouteElements for a given distance (in meters) within the route.length - The number of meters from the beginning of the route.RouteElements within the given distance.public RouteElements getRouteElementsFromLength(int start, int length)
RouteElements for a given distance (in meters) within the route.start - The number of meters into the route to start getting RouteElements.length - The number of meters from the start parameter within this route.RouteElements within the given distance.public RouteTta getTta(Route.TrafficPenaltyMode mode, int subleg)
This method requires the Traffic Enabled Car Routing permission in order to be used when mode
is Route.TrafficPenaltyMode.OPTIMAL. Please contact a HERE customer representative to
acquire this permission.
mode - The Route.TrafficPenaltyMode to be used for this calculation. Must not be
Route.TrafficPenaltyMode.AVOID_CONGESTION.subleg - The subleg number to use or WHOLE_ROUTE for the whole route.RouteTta of the subleg.java.lang.IllegalArgumentException - If mode is Route.TrafficPenaltyMode.AVOID_CONGESTION.java.lang.IllegalArgumentException - If subleg is smaller than zero or greater or equal to getSublegCount().java.security.AccessControlException - If the required permission is missing.public int getSublegCount()