Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Class: NATypes

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

NameTypeSummary
OutputLineObjectReturns the constants defined by NAOutputLine.
OutputPolygonObjectReturns the constants defined by NAOutputPolygon.
TravelDirectionObjectReturns the constants defined by NATravelDirection.
UTurnObjectReturns the constants defined by NAUTurn.
Property Details

<Object> OutputLine

Returns the constants defined by NAOutputLine

<Object> OutputPolygon

Returns the constants defined by NAOutputPolygon

<Object> TravelDirection

Returns the constants defined by NATravelDirection

<Object> UTurn

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;
});
Show Modal