public class DirectionsResponse extends Object
Constructor and Description |
---|
DirectionsResponse()
Empty constructor
|
DirectionsResponse(List<DirectionsRoute> routes,
List<DirectionsWaypoint> waypoints)
Constructor taking in both a list of
DirectionsRoute and a list of DirectionsWaypoint s. |
Modifier and Type | Method and Description |
---|---|
String |
getCode()
String indicating the state of the response.
|
List<DirectionsRoute> |
getRoutes()
List containing all the different route options.
|
List<DirectionsWaypoint> |
getWaypoints()
List with Waypoints of locations snapped to the road and path network and appear in the List
in the order of the input coordinates.
|
void |
setCode(String code)
String indicating the state of the response.
|
void |
setRoutes(List<DirectionsRoute> routes)
List containing all the different route options.
|
void |
setWaypoints(List<DirectionsWaypoint> waypoints)
List with Waypoints of locations snapped to the road and path network and should appear in the List
in the order of the input coordinates.
|
public DirectionsResponse()
public DirectionsResponse(List<DirectionsRoute> routes, List<DirectionsWaypoint> waypoints)
DirectionsRoute
and a list of DirectionsWaypoint
s.routes
- list of routes you can pass in while building this object.waypoints
- list of waypoints you can pass in while building this object. Ideally these should match what was
used to crate the route.public String getCode()
public void setCode(String code)
code
- "Ok", "NoRoute", "ProfileNotFound", or "InvalidInput".public List<DirectionsWaypoint> getWaypoints()
DirectionsWaypoint
objects.public void setWaypoints(List<DirectionsWaypoint> waypoints)
waypoints
- List of DirectionsWaypoint
objects.public List<DirectionsRoute> getRoutes()
DirectionsRoute
objects.public void setRoutes(List<DirectionsRoute> routes)
routes
- List of DirectionsRoute
objects.© 2015–2016 Mapbox. All rights reserved.