public abstract class RouteRequest extends Object implements Parcelable
Modifier and Type | Class and Description |
---|---|
static class |
RouteRequest.InstructionMeasurementSystem
The measurement system for instructions.
|
static class |
RouteRequest.Profile
The routing profile.
|
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
RouteRequest() |
Modifier and Type | Method and Description |
---|---|
static RouteRequest |
create(LatLng origin,
LatLng destination)
Creates a new
RouteRequest to request a route from the given origin, to the given
destination for driving with a car. |
static RouteRequest |
create(List<LatLng> waypoints)
Creates a new
RouteRequest with the given list of waypoints points, for driving with
a car. |
static RouteRequest |
create(RouteRequest.Profile profile,
List<LatLng> waypoints,
boolean queryAlternatives,
RouteRequest.InstructionMeasurementSystem instructionMeasurementSystem,
String instructionsLanguageCode)
Creates a new
RouteRequest with the given parameters. |
abstract RouteRequest.InstructionMeasurementSystem |
getInstructionMeasurementSystem()
Returns the measurement system for text instructions.
|
abstract String |
getInstructionsLanguageCode()
Returns the BCP47 language code for the text instructions.
|
abstract RouteRequest.Profile |
getProfile()
Returns the travel profile with which to compute the route.
|
abstract List<LatLng> |
getWaypoints()
Returns the list of waypoints for the route.
|
abstract boolean |
isQueryAlternatives()
Returns whether the request is for alternative routes, as well as the main route.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
describeContents, writeToParcel
public static RouteRequest create(RouteRequest.Profile profile, List<LatLng> waypoints, boolean queryAlternatives, RouteRequest.InstructionMeasurementSystem instructionMeasurementSystem, String instructionsLanguageCode)
RouteRequest
with the given parameters.profile
- The travel profile with which to compute the route.waypoints
- The list of waypoints for the route. The first point is the origin; the last
point is the destination. Must contain at least two points.queryAlternatives
- Whether to ask for alternative routes as well as the main one.instructionMeasurementSystem
- The measurement system to use for instructions.instructionsLanguageCode
- The BCP47 language code to use for instructions.public static RouteRequest create(List<LatLng> waypoints)
RouteRequest
with the given list of waypoints points, for driving with
a car. The text instructions will use the metric system and will be in US English.waypoints
- The list of waypoints for the route. The first point is the origin; the last
point is the destination. Must contain at least two points.public static RouteRequest create(LatLng origin, LatLng destination)
RouteRequest
to request a route from the given origin, to the given
destination for driving with a car. The text instructions will use the metric system and will
be in US English.public abstract RouteRequest.Profile getProfile()
public abstract List<LatLng> getWaypoints()
public abstract boolean isQueryAlternatives()
public abstract RouteRequest.InstructionMeasurementSystem getInstructionMeasurementSystem()
public abstract String getInstructionsLanguageCode()