public class DirectionsRoute
extends java.lang.Object
| Constructor and Description |
|---|
DirectionsRoute() |
| Modifier and Type | Method and Description |
|---|---|
double |
getDistance()
The distance traveled from origin to destination.
|
double |
getDuration()
The estimated travel time from origin to destination.
|
java.lang.String |
getGeometry()
Gives the geometry of the route.
|
java.util.List<RouteLeg> |
getLegs()
A Leg is a route between only two waypoints
|
double |
getWeight()
The calculated weight of the route.
|
java.lang.String |
getWeightName()
The name of the weight profile used while calculating during extraction phase.
|
void |
setDistance(double distance)
The distance traveled from origin to destination.
|
void |
setDuration(double duration)
The estimated travel time from origin to destination.
|
void |
setGeometry(java.lang.String geometry)
Sets the geometry of the route.
|
void |
setLegs(java.util.List<RouteLeg> legs)
A Leg is a route between only two waypoints
|
void |
setWeight(double weight)
The calculated weight of the route.
|
void |
setWeightName(java.lang.String weightName)
The name of the weight profile used while calculating during extraction phase.
|
public double getDistance()
public void setDistance(double distance)
distance - a double number with unit meters.public java.lang.String getWeightName()
DirectionsCriteria.WEIGHT_NAME_ROUTABILITY,
DirectionsCriteria.WEIGHT_NAME_DURATION, or
DirectionsCriteria.WEIGHT_NAME_DISTANCE.public void setWeightName(java.lang.String weightName)
DirectionsCriteria.WEIGHT_NAME_ROUTABILITY,
DirectionsCriteria.WEIGHT_NAME_DURATION, or
DirectionsCriteria.WEIGHT_NAME_DISTANCE.weightName - a String representing the weight profile used while calculating the route.public double getWeight()
double value.public void setWeight(double weight)
weight - the weight value as a double value.public double getDuration()
public void setDuration(double duration)
duration - a double number with unit seconds.public java.lang.String getGeometry()
public void setGeometry(java.lang.String geometry)
geometry - an encoded polyline string.public java.util.List<RouteLeg> getLegs()
RouteLeg objects.