public class RouteParameters
extends com.google.gwt.core.client.JavaScriptObject
Modifier and Type | Class and Description |
---|---|
static class |
RouteParameters.AttributeParameterValue |
Modifier and Type | Method and Description |
---|---|
static RouteParameters |
create()
Creates a new RouteParameters object.
|
boolean |
doNotLocateOnRestrictedElements()
If true, avoids network elements restricted by barriers or due to restrictions specified in restrictionAttributes.
|
boolean |
findBestSequence()
If true, optimizes the order of the stops in the route while taking into account preserveFirstStop and preserveLastStop,
if they are set to true.
|
com.google.gwt.core.client.JsArrayString |
getAccumulateAttributes()
The list of network attribute names to be accumulated with the analysis, i.e.
|
com.google.gwt.core.client.JsArray<RouteParameters.AttributeParameterValue> |
getAttributeParameterValues()
Each element in the array is an object that describes the parameter values.
|
DataLayer |
getBarriersAsDataLayer()
The set of point barriers loaded as network locations during analysis.
|
FeatureSet |
getBarriersAsFeatureSet()
The set of point barriers loaded as network locations during analysis.
|
java.lang.String |
getDirectionLengthUnits()
The length units to use when computing directions.
|
java.lang.String |
getDirectionsLanguage()
The language used when computing directions.
|
java.lang.String |
getDirectionsTimeAttribute()
The name of network attribute to use for the drive time when computing directions.
|
java.lang.String |
getImpedanceAttribute()
The network attribute name to be used as the impedance attribute in analysis.
|
int |
getOutputGeometryPrecision()
The precision of the output geometry after generalization.
|
java.lang.String |
getOutputGeometryPrecisionUnits()
The units of the output geometry precision.
|
NAOutputLine |
getOutputLines()
The type of output lines to be generated in the result.
|
SpatialReference |
getOutSpatialReference()
The well-known ID of the spatial reference for the geometries returned with the analysis results.
|
DataLayer |
getPolygonBarriersAsDataLayer()
The set of polygon barriers loaded as network locations during analysis.
|
DataLayer |
getPolygonBarriersAsFeatureSet()
The set of polygon barriers loaded as network locations during analysis.
|
DataLayer |
getPolylineBarriersAsDataSet()
The set of polyline barriers loaded as network locations during analysis.
|
FeatureSet |
getPolylineBarriersAsFeatureSet()
The set of polyline barriers loaded as network locations during analysis.
|
com.google.gwt.core.client.JsArrayString |
getRestrictionAttributes()
The list of network attribute names to be used as restrictions with the analysis.
|
NAUTurn |
getRestrictUTurns()
Specifies how U-Turns should be handled.
|
boolean |
getReturnBarriers()
If true, barriers are returned as the second parameter of RouteTask.onSolveComplete.
|
boolean |
getReturnDirections()
If true, directions are generated and returned in the directions property of each RouteResult.
|
boolean |
getReturnPolylineBarriers()
If true, polyline barriers are returned as the fourth parameter of RouteTask.onSolveComplete.
|
boolean |
getReturnRoutes()
If true, routes are generated and returned in the route property of each RouteResult.
|
boolean |
getReturnStops()
If true, stops are returned in the stops property of each RouteResult.
|
com.google.gwt.core.client.JsDate |
getStartTime()
The time the route begins.
|
DataLayer |
getStopsAsDataLayer()
The set of stops loaded as network locations during analysis.
|
FeatureSet |
getStopsAsFeatureSet()
The set of stops loaded as network locations during analysis.
|
boolean |
ignoreInvalidLocations()
In routes where a stop is not located on a network or a stop could not be reached, the results will differ depending on the value of ignoreInvalidLocations.
|
boolean |
preserveFirstStop()
If true, keeps the first stop fixed in the sequence even when findBestSequence is true.
|
boolean |
preserveLastStop()
If true, keeps the last stop fixed in the sequence even when findBestSequence is true.
|
boolean |
returnPolygonBarriers()
If true, polygon barriers are returned as the third parameter of RouteTask.onSolveComplete.
|
void |
setAccumulateAttributes(java.lang.String[] accumulateAttributes)
Set the accumulateAttributes parameter.
|
void |
setAttributeParameterValues(RouteParameters.AttributeParameterValue[] attributeParameterValues)
Set the attributeParameterValues parameter.
|
void |
setBarriers(DataLayer barriers)
Set the barriers parameter.
|
void |
setBarriers(FeatureSet barriers)
Set the barriers parameter.
|
void |
setDirectionLengthUnits(java.lang.String directionsLengthUnits)
Set the directionsLengthUnits
|
void |
setDirectionsLanguage(java.lang.String directionsLanguage)
Set the directionsLanguage parameter.
|
void |
setDirectionsTimeAttribute(java.lang.String directionsTimeAttribute)
Set the directionsTimeAttribute parameter.
|
void |
setDoNotLocateOnRestrictedElements(boolean doNotLocateOnRestrictedElements)
set the doNotLocateOnRestrictedElements parameter.
|
void |
setFindBestSequence(boolean findBestSequence)
Set the findBestSequence parameter.
|
void |
setIgnoreInvalidLocations(boolean ignoreInvalidLocations)
Set the ignoreInvalidLocations parameter.
|
void |
setImpedanceAttribute(java.lang.String impedanceAttribute)
Set the impedanceAttribute parameter.
|
void |
setOutputGeometryPrecision(int outputGeometryPrecision)
Set the outputGeometryPrecision parameter.
|
void |
setOutputGeometryPrecisionUnits(java.lang.String outputGeometryPrecisionUnits)
Set the outputGeometryPrecisionUnits parameter.
|
void |
setOutputLines(NAOutputLine outputLines)
Set the outputLines parameter
|
void |
setOutSpatialReference(SpatialReference outSpatialReference)
Set the outSpatialReference parameter.
|
void |
setPolygonBarriers(DataLayer polygonBarriers)
Set the polygonBarriers parameter.
|
void |
setPolygonBarriers(FeatureSet polygonBarriers)
Set the polygonBarriers parameter.
|
void |
setPolylineBarriers(DataLayer polylineBarriers)
Set the polylineBarriers parameter.
|
void |
setPolylineBarriers(FeatureSet polylineBarriers)
Set the polylineBarriers parameter.
|
void |
setPreserveFirstStop(boolean preserveFirstStop)
Set the preserveFirstStop parameter.
|
void |
setPreserveLastStop(boolean preserveLastStop)
Set the preserveLastStop parameter.
|
void |
setRestrictionAttributes(java.lang.String[] restrictionAttributes)
Set the restrictionAttributes parameter.
|
void |
setRestrictUTurns(NAUTurn restrictUTurns)
set the restrictUTurns parameter.
|
void |
setReturnBarriers(boolean returnBarriers)
set the returnBarriers parameter.
|
void |
setReturnDirections(boolean returnDirections)
Set the returnDirections parameter.
|
void |
setReturnPolygonBarriers(boolean returnPolygonBarriers)
Set the returnPolygonBarriers parameter.
|
void |
setReturnPolylineBarriers(boolean returnPolylineBarriers)
Set the returnPolylineBarriers parameter.
|
void |
setReturnRoutes(boolean returnRoutes)
Set the returnRoutes parameter.
|
void |
setReturnStops(boolean returnStops)
Set the returnStops parameter.
|
void |
setStartTime(com.google.gwt.core.client.JsDate startTime)
Set the startTime parameter.
|
void |
setStops(DataLayer stops)
Set the stops parameter.
|
void |
setStops(FeatureSet stops)
Set the stops parameter.
|
void |
setUseHierarchy(boolean useHierarchy)
Set the useHierarchy parameter.
|
void |
setUseTimeWindows(boolean useTimeWindows)
Set the useTimeWindow parameter.
|
boolean |
useHierarchy()
If true, the hierarchy attribute for the network should be used in analysis.
|
boolean |
useTimeWindows()
If true, time windows should be used in the analysis.
|
public static RouteParameters create()
public final com.google.gwt.core.client.JsArrayString getAccumulateAttributes()
public final void setAccumulateAttributes(java.lang.String[] accumulateAttributes)
accumulateAttributes
- - The list of network attribute names to be accumulated with the analysis, i.e. which attributes
should be returned as part of the response. The default is as defined in the specific routing network layer used in your
RouteTask. You can specify any attributes names listed in the Service Directory under "Network Dataset -> Network Attributes"
as "Usage Type: esriNAUTCost".public final com.google.gwt.core.client.JsArray<RouteParameters.AttributeParameterValue> getAttributeParameterValues()
public final void setAttributeParameterValues(RouteParameters.AttributeParameterValue[] attributeParameterValues)
attributeParameterValues
- - Each element in the array is an object that describes the parameter values.public final DataLayer getBarriersAsDataLayer()
public final FeatureSet getBarriersAsFeatureSet()
public final void setBarriers(DataLayer barriers)
barriers
- - The set of point barriers loaded as network locations during analysis.public final void setBarriers(FeatureSet barriers)
barriers
- - The set of point barriers loaded as network locations during analysis.public final java.lang.String getDirectionsLanguage()
public final void setDirectionsLanguage(java.lang.String directionsLanguage)
directionsLanguage
- - The language used when computing directions. The default is as defined in the specific routing
network layer used in your RouteTask. By default, NAServer gets installed with en_US only - it is up to the server administrator
to add additional languages.public final java.lang.String getDirectionLengthUnits()
public final void setDirectionLengthUnits(java.lang.String directionsLengthUnits)
directionsLengthUnits
- - The length units to use when computing directions. The default is as defined in the specific routing network layer used in your
RouteTask. Known values: esriFeet | esriKilometers | esriMeters | esriMiles | esriNauticalMiles | esriYardspublic final java.lang.String getDirectionsTimeAttribute()
public final void setDirectionsTimeAttribute(java.lang.String directionsTimeAttribute)
directionsTimeAttribute
- - The name of network attribute to use for the drive time when computing directions. The default is as defined
in the specific routing network layer used in your RouteTask.public final boolean doNotLocateOnRestrictedElements()
public final void setDoNotLocateOnRestrictedElements(boolean doNotLocateOnRestrictedElements)
doNotLocateOnRestrictedElements
- - If true, avoids network elements restricted by barriers or due to
restrictions specified in restrictionAttributes.public final boolean findBestSequence()
public final void setFindBestSequence(boolean findBestSequence)
findBestSequence
- - If true, optimizes the order of the stops in the route while taking into account preserveFirstStop
and preserveLastStop, if they are set to true. The default is as defined in the specific routing network layer used in your RouteTask.public final boolean ignoreInvalidLocations()
public final void setIgnoreInvalidLocations(boolean ignoreInvalidLocations)
ignoreInvalidLocations
- - In routes where a stop is not located on a network or a stop could not be reached, the results will
differ depending on the value of ignoreInvalidLocations.
When false, the solve operation will fail if at least one of the stops specified cannot be located or reached.
When true, as long as there are at least two valid stops that have been connected by a route, a valid result
is returned. If multiple routes are processed in a single request, as long as least one route is built, a valid
result is returned. The list of routes that cannot be solved is included in the message parameter of
RouteTask.onSolveComplete.public final java.lang.String getImpedanceAttribute()
public final void setImpedanceAttribute(java.lang.String impedanceAttribute)
impedanceAttribute
- - The network attribute name to be used as the impedance attribute in analysis. The default is as defined in the specific routing network
layer used in your RouteTask. You can specify any attributes names listed in the Service Directory under "Network Dataset -> Network Attributes"
as "Usage Type: esriNAUTCost". You can also specify a value of "none" to indicate that no network attributes should be used for impedance.
If you specify an empty array, it will default to the default of the service.public final int getOutputGeometryPrecision()
public final void setOutputGeometryPrecision(int outputGeometryPrecision)
outputGeometryPrecision
- - The precision of the output geometry after generalization. If 0, no generalization of output geometry is performed. If
present and positive, it represents the MaximumAllowableOffset parameter - generalization is performed according to IPolycurve.Generalize.public final java.lang.String getOutputGeometryPrecisionUnits()
public final void setOutputGeometryPrecisionUnits(java.lang.String outputGeometryPrecisionUnits)
outputGeometryPrecisionUnits
- - The units of the output geometry precision. The default value is "esriUnknownUnits".
Known values: esriUnknownUnits | esriCentimeters | esriDecimalDegrees | esriDecimeters | esriFeet | esriInches | esriKilometers
| esriMeters | esriMiles | esriMillimeters | esriNauticalMiles | esriPoints | esriYardspublic final NAOutputLine getOutputLines()
public final void setOutputLines(NAOutputLine outputLines)
outputLines
- - The type of output lines to be generated in the result. The default is as defined in the specific routing network
layer used in your RouteTask.public final SpatialReference getOutSpatialReference()
public final void setOutSpatialReference(SpatialReference outSpatialReference)
outSpatialReference
- - The well-known ID of the spatial reference for the geometries returned with the analysis results.
If not specified, the geometries are returned in the spatial reference of the mappublic final DataLayer getPolygonBarriersAsDataLayer()
public final DataLayer getPolygonBarriersAsFeatureSet()
public final void setPolygonBarriers(DataLayer polygonBarriers)
polygonBarriers
- - The set of polygon barriers loaded as network locations during analysis.public final void setPolygonBarriers(FeatureSet polygonBarriers)
polygonBarriers
- - The set of polygon barriers loaded as network locations during analysis.public final DataLayer getPolylineBarriersAsDataSet()
public final FeatureSet getPolylineBarriersAsFeatureSet()
public final void setPolylineBarriers(DataLayer polylineBarriers)
polylineBarriers
- - The set of polyline barriers loaded as network locations during analysis. Can be either an instance of DataLayer or FeatureSet.public final void setPolylineBarriers(FeatureSet polylineBarriers)
polylineBarriers
- - The set of polyline barriers loaded as network locations during analysis. Can be either an instance of DataLayer or FeatureSet.public final boolean preserveFirstStop()
public final void setPreserveFirstStop(boolean preserveFirstStop)
preserveFirstStop
- - If true, keeps the first stop fixed in the sequence even when findBestSequence is true. Only applicable if findBestSequence
is true. The default is as defined in the specific routing network layer used in your RouteTask.public final boolean preserveLastStop()
public final void setPreserveLastStop(boolean preserveLastStop)
preserveLastStop
- - If true, keeps the last stop fixed in the sequence even when findBestSequence is true. Only applicable if findBestSequence
is true. The default is as defined in the specific routing network layer used in your RouteTask.public final com.google.gwt.core.client.JsArrayString getRestrictionAttributes()
public final void setRestrictionAttributes(java.lang.String[] restrictionAttributes)
restrictionAttributes
- - The list of network attribute names to be used as restrictions with the analysis. The default is as defined in the specific
routing network layer used in your RouteTask. Possible values are listed in the Service Directory under "Network Dataset -> Network Attributes". You
can also specify a value of "none" to indicate that no network attributes should be used as restrictions. If you specify an empty array, it will default to
the default of the service.public final NAUTurn getRestrictUTurns()
public final void setRestrictUTurns(NAUTurn restrictUTurns)
restrictUTurns
- - Specifies how U-Turns should be handled. The default is as defined in the specific routing network layer used in your RouteTaskpublic final boolean getReturnBarriers()
public final void setReturnBarriers(boolean returnBarriers)
returnBarriers
- - If true, barriers are returned as the second parameter of RouteTask.onSolveComplete.public final boolean getReturnDirections()
public final void setReturnDirections(boolean returnDirections)
returnDirections
- - If true, directions are generated and returned in the directions property of each RouteResult.public final boolean returnPolygonBarriers()
public final void setReturnPolygonBarriers(boolean returnPolygonBarriers)
returnPolygonBarriers
- - If true, polygon barriers are returned as the third parameter of RouteTask.onSolveComplete.public final boolean getReturnPolylineBarriers()
public final void setReturnPolylineBarriers(boolean returnPolylineBarriers)
returnPolylineBarriers
- - If true, polyline barriers are returned as the fourth parameter of RouteTask.onSolveComplete.public final boolean getReturnRoutes()
public final void setReturnRoutes(boolean returnRoutes)
returnRoutes
- - If true, routes are generated and returned in the route property of each RouteResult.public final boolean getReturnStops()
public final void setReturnStops(boolean returnStops)
returnStops
- - If true, stops are returned in the stops property of each RouteResult.public final com.google.gwt.core.client.JsDate getStartTime()
public final void setStartTime(com.google.gwt.core.client.JsDate startTime)
startTime
- - The time the route begins. If not specified, the default is the time specified in the route service.public final DataLayer getStopsAsDataLayer()
public final FeatureSet getStopsAsFeatureSet()
public final void setStops(DataLayer stops)
stops
- - The set of stops loaded as network locations during analysis. Can be either an instance of DataLayer or
FeatureSet. When RouteParameters.stops takes a FeatureSet, each feature in the FeatureSet must have a defined
spatial reference. If the feature contains x and y attributes, those values are used for the stop, even if the feature
includes geometry. For the list of attributes that can be set on a stop, see the "Stop properties" section in Finding
the best route.public final void setStops(FeatureSet stops)
stops
- - The set of stops loaded as network locations during analysis. Can be either an instance of DataLayer
or FeatureSet. When RouteParameters.stops takes a FeatureSet, each feature in the FeatureSet must have a defined
spatial reference. If the feature contains x and y attributes, those values are used for the stop, even if the feature
includes geometry. For the list of attributes that can be set on a stop, see the "Stop properties" section in Finding
the best route.public final boolean useHierarchy()
public final void setUseHierarchy(boolean useHierarchy)
useHierarchy
- - If true, the hierarchy attribute for the network should be used in analysis. The default is as defined in
the specific routing network layer used in your RouteTask.public final boolean useTimeWindows()
public final void setUseTimeWindows(boolean useTimeWindows)
useTimeWindows
- - If true, time windows should be used in the analysis. The default is as defined in the specific routing network
layer used in your RouteTask.