|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.panama.spatial.router.RoutingSettings
This class defines routing settings that can be passed to a router.
Example are "ShortestDistance" or "AvoidToll."
They are two types of options: basic options and secondary options.
Basic options are:
- requestMap : whether maps are requested for the route
- requestGeometry: whether geometry (shape points) along the route is requested
User can specify basic options when constructing a RoutingOption object.
The default basic options are
request map and do not request geometry points.
Secondary options include:
- RoutingOption.avoidFerry
- RoutingOption.avoidLimitedAccessHwy
- RoutingOption.avoidToll
- RoutingOption.maneuverMapHeigh
- RoutingOption.maneuverMapWidth
- RoutingOption.maneuverMapScale
- RoutingOption.maneuverMapZoomLevel
- RoutingOption.overviewMapHeigh
- RoutingOption.overviewMapWidth
- RoutingOption.overviewMapScale
- RoutingOption.overviewMapZoomLevel
- RoutingOption.optimization (how is the route optimized, currently support "ShortestDistance" and "ShortestTime")
A secondary option can be either required or not required. If a secondary
option is required but not available from the provider, it will automtically
fail over to the next provider. If a secondary option is not required,
then the "best effort" will be attempted.
Therefore, if a secondary option is set to "required" and a non-null
result is returned, the option is guaranteed to be satisfied. If a
secondary option is not set to "required" then the result may or may not
satisfy that option.
The application developers are not required to specify whether a secondary
option is required or not. There are a set of default values for secondary
options. They are:
AvoidFerry -- Not required
AvoidLimitedAccessHwy -- Not required
AvoidToll -- Not required
overview Map size -- Required
maneuver Map size -- Required
Overview Map scale and zoomlevel -- Not required
Maneuver Map scale and zoomlevel -- Not required
Optimization method -- Not required
This class is not made thread-safe. The API user has to make sure that no other thread is making changes to a RoutingSettings object until it has been used as input for the/all of the routing operation(s).
Field Summary |
Type | Field |
---|---|
static java.lang.String |
SHORTEST_DISTANCE
|
static java.lang.String |
SHORTEST_TIME
|
Constructor Summary |
RoutingSettings()
Default constructor. |
RoutingSettings(boolean requestMap,
boolean requestGeometry)
Constructor |
Method Summary |
Type | Method |
---|---|
java.lang.String |
getSecondaryOption(RoutingOption option)
This returns a secondary routing option. |
boolean |
isGeometryRequested()
This returns whether shape points (lat/lon) are requested. |
boolean |
isMapRequested()
This returns whether maps are requested. |
boolean |
isSecondaryOptionRequired(RoutingOption option)
|
void |
setBasicOptions(boolean requestMap,
boolean requestGeometry)
This sets the basic routing options. |
void |
setRequestGeometry(boolean requestGeometry)
Basic options can also be set separatly. |
void |
setRequestMap(boolean requestMap)
Basic options can also be set separatly. |
void |
setSecondaryOption(RoutingOption option,
java.lang.String value)
This sets a secondary routing option. |
void |
setSecondaryOptionRequired(RoutingOption option,
boolean required)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String SHORTEST_TIME
public static final java.lang.String SHORTEST_DISTANCE
Constructor Detail |
public RoutingSettings()
public RoutingSettings(boolean requestMap, boolean requestGeometry)
requestMap
- a boolean representing whether a map is requestedrequestGeometry
- a boolean representing whether a list of points
(lat/lon) is requestedMethod Detail |
public void setBasicOptions(boolean requestMap, boolean requestGeometry)
requestMap
- a boolean representing whether maps are requestedrequestGeometry
- a boolean representing whether a list of points
(lat/lon) is requestedpublic void setRequestMap(boolean requestMap)
requestMap
- a boolean representing whether maps are requestedpublic void setRequestGeometry(boolean requestGeometry)
requestGeometry
- a boolean representing whether a list of points
(lat/lon) is requestedpublic boolean isMapRequested()
public boolean isGeometryRequested()
public void setSecondaryOption(RoutingOption option, java.lang.String value)
option
- a Class representing the option type (in contrast to a
String this can be checked for consistency at compile time)value
- a String representing the option valuepublic void setSecondaryOptionRequired(RoutingOption option, boolean required)
public boolean isSecondaryOptionRequired(RoutingOption option)
public java.lang.String getSecondaryOption(RoutingOption option)
option
- a Class representing the option type (in contrast to a
String this can be checked for consistency at compile time)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |