Publish standard routing services

The standard routing services are the map and geoprocessing services that provide out-of-the-box capabilities available with Network Analyst. To perform network analysis using the six different types of solvers as web services in ArcGIS Enterprise, you can publish them as standard routing services. When you publish standard routing services, ArcGIS Enterprise provides full capability and integration with out-of-the-box Esri applications such as ArcGIS Pro and Map Viewer.

Note:

The workflow in this topic is focused on publishing the map services. To publish geoprocessing services, see the publish custom routing services documentation.

One of the ways to create a routing service is to publish a map service in ArcGIS Pro with the network analysis capability enabled using the ArcGIS Network Analyst extension.

Note:
If you are publishing from ArcGIS Pro to ArcGIS Enterprise, refer to the Share a map image layer workflow. If you are publishing from ArcGIS Pro to a stand-alone ArcGIS Server site, refer to Publish a map service documentation.

Note:
The Publish map service with network analysis capabilities from ArcGIS Pro can be replaced with the Configure routing services capabilities if you have ArcGIS Enterprise with a federated server or the Publish Routing Services utility if you have a stand-alone server. The Configure routing services and publish routing services utility not only publishes map service with network analysis capabilities but also publishes geoprocessing services, which are used by ArcGIS Pro and Map Viewer analysis tools.

Learn more about the options for publishing routing services

The first step in creating this type of routing service is to create a map in ArcGIS Pro that contains one or more network analysis layers. When using locate service, you will also need to add the network dataset layer to the map. Then publish the map as a service, ensuring that the network analysis capability is enabled. You can consume the resulting service programmatically using ArcGIS web APIs, ArcGIS Runtime SDK, or the REST API of the service in a programming language of your choice.

Create a map

Before you can publish a routing service, you must create a map in ArcGIS Pro that, at a minimum, contains the network analysis layer you will use in your service. You can either add an existing network analysis layer using the Add Data dialog box or create a network analysis layer. This network analysis layer, either imported or created, must use a local network dataset. If it is using a network data source from a portal (either ArcGIS Online or ArcGIS Enterprise), you cannot publish the map as a service with network analysis capability. You will also need to add the network dataset layer to the map if you are publishing Locate service.

Caution:

Publishing and consuming Location-allocation and Vehicle Routing Problem operations are unavailable in the map service with network analysis capability. Do not add Location-allocation and Vehicle Routing Problem layers to the map.

You can edit the properties of the network analysis layers, such as the number of facilities to find in a Closest Facility Analysis Layer or the travel mode to be used as the default for the analysis, in ArcGIS Pro. These properties are used as default values by the published service.

  1. Create a map using ArcGIS Pro
  2. Add the network dataset to the map.

    The locate service is performed on a network dataset layer resource. To successfully perform a network analysis using your routing services, the routing services must identify the location on the network dataset where each analysis input lies.

  3. Create one or more network analysis layers in the map.

Publish the service

After you have created and saved the map, you can share the map as a map image layer from ArcGIS Pro if your ArcGIS Server site is federated with a portal, or as a map service when publishing to a stand-alone ArcGIS Server site from ArcGIS Pro. Enable the network analysis capability while publishing the map image layer or map service.

Note:
The following steps will publish the service as a map image layer. To publish a map service instead, see publish a map service documentation.

  1. On the Share tab, in the Share As group, click Publish Web Layer to open the Share As Web Layer pane.
  2. Complete all the information on the General tab.
  3. Check the Map Image check box under Layer Type.
  4. On the Configuration tab, configure the map image layer properties and enable network analysis capability.
  5. Click the Analyze button at the bottom of the page to analyze any potential errors or warnings.
  6. Once the validation is successful, click Publish to share the map.

To configure additional properties on the map service, see the documentation on editing routing services properties.

Use the service

You can use the routing services to include network analysis capabilities in your own custom applications. ArcGIS developers have many APIs that work with the routing services, such as the ArcGIS Maps SDK for JavaScript, the ArcGIS REST API, or the various native ArcGIS Maps SDKs.

Learn more about the various APIs to access routing services