public final class RouteOptions
extends java.lang.Object
RouteOptions
class. The class contains options for route
calculation.Modifier and Type | Class and Description |
---|---|
static class |
RouteOptions.TimeType
Ways that the time can be specified.
|
static class |
RouteOptions.TransportMode
Represents values describing different mode of transportation a person will be using.
|
static class |
RouteOptions.Type
Represents different types of routing, such as by speed or by distance.
|
Constructor and Description |
---|
RouteOptions()
Public Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
areCarShuttleTrainsAllowed()
Checks whether Car Shuttle Trains are allowed.
|
boolean |
areDirtRoadsAllowed()
Checks whether Dirt Roads are allowed.
|
boolean |
areFerriesAllowed()
Checks whether Ferries are allowed.
|
boolean |
areHighwaysAllowed()
Checks whether Highways are allowed.
|
boolean |
areParksAllowed()
Checks whether Parks are allowed.
|
boolean |
areTollRoadsAllowed()
Checks whether Toll Roads are allowed.
|
boolean |
areTunnelsAllowed()
Checks whether Tunnels are allowed.
|
int |
getRouteCount()
Gets the current desired number of route
|
RouteOptions.Type |
getRouteType()
Gets the Route Type, see
RouteOptions.Type for valid values |
int |
getStartDirection()
Returns the start direction.
|
RouteOptions.TimeType |
getTime(java.util.Date date)
Gets the arrival or departure time that has been set.
|
RouteOptions.TransportMode |
getTransportMode()
Gets the Transport Mode, see
RouteOptions.TransportMode for valid values |
boolean |
isCarpoolAllowed()
Check if usage of HOV/Carpool roads is allowed.
|
RouteOptions |
setCarpoolAllowed(boolean value)
Allow or disallow usage of HOV/Carpool roads.
|
RouteOptions |
setCarShuttleTrainsAllowed(boolean value)
Sets whether Car Shuttle Trains are allowed.
|
RouteOptions |
setDirtRoadsAllowed(boolean value)
Sets whether Dirt Roads are allowed.
|
RouteOptions |
setFerriesAllowed(boolean value)
Sets whether Ferries are allowed.
|
RouteOptions |
setHighwaysAllowed(boolean value)
Sets whether Highways are allowed.
|
RouteOptions |
setParksAllowed(boolean value)
Sets whether Parks are allowed.
|
RouteOptions |
setRouteCount(int count)
Sets the desired number of route.
|
RouteOptions |
setRouteType(RouteOptions.Type routeType)
Sets the Route Type, see
RouteOptions.Type for valid values |
RouteOptions |
setStartDirection(int dirInDegrees)
Start direction.
|
RouteOptions |
setTime(java.util.Date time,
RouteOptions.TimeType type)
Sets the arrival or departure time.
|
RouteOptions |
setTollRoadsAllowed(boolean value)
Sets whether Toll Roads are allowed.
|
RouteOptions |
setTransportMode(RouteOptions.TransportMode mode)
Sets the Transport Mode.
|
RouteOptions |
setTunnelsAllowed(boolean value)
Sets whether Tunnels are allowed.
|
public RouteOptions.Type getRouteType()
RouteOptions.Type
for valid valuesType
.public RouteOptions setRouteType(RouteOptions.Type routeType)
RouteOptions.Type
for valid valuesrouteType
- Type
RouteOptions
itself.public RouteOptions.TransportMode getTransportMode()
RouteOptions.TransportMode
for valid valuesRouteOptions
.public RouteOptions setTransportMode(RouteOptions.TransportMode mode)
mode
- The desired RouteOptions.TransportMode
to use.RouteOptions
itself.public boolean areHighwaysAllowed()
public RouteOptions setHighwaysAllowed(boolean value)
value
- true if allowed otherwise false.RouteOptions
itself.public boolean areTollRoadsAllowed()
public RouteOptions setTollRoadsAllowed(boolean value)
value
- true if allowed otherwise false.RouteOptions
itself.public boolean areFerriesAllowed()
public RouteOptions setFerriesAllowed(boolean value)
value
- true if allowed otherwise false.RouteOptions
itself.public boolean areTunnelsAllowed()
public RouteOptions setTunnelsAllowed(boolean value)
value
- true if allowed otherwise false.RouteOptions
itself.public boolean areDirtRoadsAllowed()
public RouteOptions setDirtRoadsAllowed(boolean value)
value
- true if allowed otherwise false.RouteOptions
itself.public boolean areCarShuttleTrainsAllowed()
public RouteOptions setCarShuttleTrainsAllowed(boolean value)
value
- true if allowed otherwise false.RouteOptions
itself.public boolean areParksAllowed()
public RouteOptions setParksAllowed(boolean value)
value
- Use true
if allowed, otherwise false
.RouteOptions
itself.public boolean isCarpoolAllowed()
true
if allowed, otherwise false
.public RouteOptions setCarpoolAllowed(boolean value)
value
- Use true
if allowed, otherwise false
.RouteOptions
itself.public RouteOptions setTime(java.util.Date time, RouteOptions.TimeType type)
time
- The time to set.type
- The type of time to set.RouteOptions
itself.java.lang.IllegalArgumentException
- If type
is set to ARRIVAL, because it is
not supported.public RouteOptions.TimeType getTime(java.util.Date date)
date
- Output parameter where the date will be set. This may be null if the caller is
only interested in the RouteOptions.TimeType
.TimeType
of the parameter upon completion.public int getRouteCount()
public RouteOptions setRouteCount(int count)
Values greater than 10 are ignored if RouteOptions.TransportMode
is set to public transport and
online timetables are enabled.
count
- route countRouteOptions
itself.public RouteOptions setStartDirection(int dirInDegrees)
RouteOptions.TransportMode
is pedestrian. Use
values between 0-359. If greater value than 359 is specified, modulo of 360 is used.dirInDegrees
- Start direction in degrees. 0 is north, increases clockwise (ie. 90 is east).RouteOptions
itself.public int getStartDirection()