public class DirectionsRoute extends 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.
|
String |
getGeometry()
Gives the geometry of the route.
|
List<RouteLeg> |
getLegs()
A Leg is a route between only two waypoints
|
double |
getWeight()
The calculated weight of the route.
|
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(String geometry)
Sets the geometry of the route.
|
void |
setLegs(List<RouteLeg> legs)
A Leg is a route between only two waypoints
|
void |
setWeight(double weight)
The calculated weight of the route.
|
void |
setWeightName(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 String getWeightName()
DirectionsCriteria.WEIGHT_NAME_ROUTABILITY
,
DirectionsCriteria.WEIGHT_NAME_DURATION
, or
DirectionsCriteria.WEIGHT_NAME_DISTANCE
.public void setWeightName(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 String getGeometry()
public void setGeometry(String geometry)
geometry
- an encoded polyline string.public List<RouteLeg> getLegs()
RouteLeg
objects.© 2015–2016 Mapbox. All rights reserved.