How to set snap options for Network Analyst Services via REST API?

3773
1
05-13-2014 11:39 PM
SebastianStey
New Contributor II
Can anybody tell me how to define snap options when using Network Services via REST API?

Using ArcGIS for Desktop I can snap Point Geometries to the Network either using "Add Location (Network Analyst)" or "Calculate Locations (Network Analyst)" with a subsequent "Add Location (Network Analyst)".
Either way, I may define search criteria, match type, and even a search query.

However, I can't find out how to do this using ArcGIS for Server REST API with a simple Network Service.

I have two questions.

1:
When I configure "Network Locations" (lets say "snap to first" instead of "snap to closest", and I define a search query for the Network's edges) for the Network Layer in my Map Document, prior to publishing the Network Service to ArcGIS for Server: will these settings be used when I solve a route using ArcGIS for Server REST call with x and y for my stops? Or will it always snap to closest point on an edge of the Network?

2:
Actually, I need to define different search queries each time I solve a route. Is it possible to define these snap options in the REST API call (http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Solve_Route/02r3000000q3000000/)?
Or is it possible to use SourceID, SourceOID, PosAlong, SideOfEdge instead of x and y as stops for a route?

Kind Regards
Sebastian
0 Kudos
1 Reply
JasonHarris2
New Contributor III

You ever find a resolution to this?  When I define the snapping distance for the route layer in the mxd and publish - they do not seem to carry over to the published service, and I havent seen a way to control it via rest or in the service definition.

I have a network setup with lots of points that are a very significant distance off the network - some a hundred miles or more.  I cannot get a route to solve unless my point intersects with that line - exactly.

Its likely I am missing something as this NA is new to me.

0 Kudos