How to add Stops into Network Analyst Service Route Layer from REST API?

878
3
Jump to solution
07-30-2020 10:50 AM
JamesMadden1
Occasional Contributor

Is there anyway to add stops directly from features that participate in the network dataset?  I have a network dataset that consists of a polyline route layer and a point layer representing stops along the network.  I am able to add the stops after querying for their geometry in their own map service but this results in two queries on the client.  I would prefer to add the stops in directly in the solve endpoint.  

0 Kudos
1 Solution

Accepted Solutions
MaxZeng
Esri Contributor

Hi James,

Are you aware you can specify a query request to your feature service/ map service as a url to stops input parameter on solve operation?

I am assuming you publish your own routing services on your enterprise, since you talked about network dataset. Here is the doc for enterprise routing service, Route service with synchronous execution—ArcGIS REST API | ArcGIS for Developers, the stops parameter documentation describes how to specify a url as input. And Example three: Specifying stops using a URL shows an example of specifying url for stops parameter.

By doing this, you don't need to do queries on the client.

Does this help?

View solution in original post

0 Kudos
3 Replies
MaxZeng
Esri Contributor

Hi James,

Are you aware you can specify a query request to your feature service/ map service as a url to stops input parameter on solve operation?

I am assuming you publish your own routing services on your enterprise, since you talked about network dataset. Here is the doc for enterprise routing service, Route service with synchronous execution—ArcGIS REST API | ArcGIS for Developers, the stops parameter documentation describes how to specify a url as input. And Example three: Specifying stops using a URL shows an example of specifying url for stops parameter.

By doing this, you don't need to do queries on the client.

Does this help?

0 Kudos
JamesMadden1
Occasional Contributor

Max,

Thank you for the helpful response.  That is exactly what we were looking for.

0 Kudos
MaxZeng
Esri Contributor

Great! Glad to help!

0 Kudos