require(["esri/tasks/NATypes"], function(NATypes) { /* code goes here */ });
Description
(Added at v1.4)
Constants representing parameters for network analysis tasks. Should be used in favor of network analysis parameters classes. For example:
require([
"esri/tasks/ClosestFacilityParameters",
"esri/tasks/NATypes",
"esri/tasks/RouteParameters",
"esri/tasks/ServiceAreaParameters"
], function (Map, ClosestFacilityParameters, NATypes, RouteParameters, ServiceAreaParameters){
var closestFacilityParams = new ClosestFacilityParameters();
var routeParams = new RouteParameters();
var serviceAreaParams = new ServiceAreaParameters();
closestFacilityParams.outputLines = NATypes.OutputLine.STRAIGHT;
closestFacilityParams.travelDirection = NATypes.TravelDirection.FROM_FACILITY;
serviceAreaParams.outputPolygons = NATypes.OutputPolygon.DETAILED;
routeParams.restrictUTurns = NATypes.UTurn.ALLOW_BACKTRACK;
});
Samples
Search for
samples that use this class.
Properties
Property Details
Returns the constants
defined by NAUTurn. NAUTurn has no constructor. Should be used in favor of network analysis parameters classes.
Sample: require(["esri/tasks/RouteParameters", "esri/tasks/NATypes"], function(RouteParameters, NATypes){
var routeParams = new RouteParameters();
routeParams.restrictUTurns = NATypes.UTurn.ALLOW_BACKTRACK;
});