The ArcGIS API for JavaScript's directions and routing capabilities are provided by network analysis services running on ArcGIS Server. In order to create and publish a network service, you must have the Network Analyst extension in ArcGIS Pro. However, you can use third-party services in your web mapping application, such as those we reference in this chapter, without a license.
These services enable you to model transportation networks so that you can perform various analyses, such as finding the best route from one address to another, locating the closest school to your home, identifying a service area around potential sites for a new delivery department, or managing a delivery schedule with a fleet of service vehicles.
There are three main tasks that network analysis services can perform, that you access via the appropriate task objects in the ArcGIS API for JavaScript. These are routing, closest facility, and service area. We'll examine each of the service...