1

I have built a small road featureclass, created a network off of it using network analyst, and created routes successfully in ArcMap. I'm now trying to create these routes in a silverlight web application and in order to do that I need to pass the geometry of two stops (polygons) to the routing service. I'm not having any luck and I think it's because the centroid being calculated by the web application isn't "exactly" on the routing service. So I'm wondering instead of passing a point centroid, I could instead pass the polygons geometry of my two stops to the routing service? Does anyone have an example of how to do this? Or is this possible?

  • What is the exact error if you look at the http traffic? – Bjorn Svensson Feb 7 '14 at 23:01
1

As for your question "Can a routing service take polygon geometry (for stops)?" the answer is ,no, it cannot. You have to send in the points as stops (not polygons).

To solve the problem of your web application not returning anything, there are different restriction that apply to a service, some of which can be modified in the route request. For example, make sure the DoNotLocateOnRestrictedElements is set to true.

  • This answer was flagged as low-quality because of its length. To avoid it being converted to a Comment you may want to revise it with a little more detail to back up your advice. – PolyGeo Feb 7 '14 at 23:30
  • @Bjorn- Thanks for the information Bjorn, that makes sense. But after setting routeParameters.DoNotLocateOnRestrictedElements = True, the routing service still does not produce routes (but does in ArcMap which baffles me). After passing the stop parameters to the routing service, I simply check if the routing service accepted the parameters in a try/catch and it only works for one out of the 4 stops. I'll try to get an error message for you using fiddler – DaBears Feb 9 '14 at 17:34
  • @Bjorn- I'm not that familiar with Fiddler yet but with "Inspector" checked and looking under "JSON", the only thing that stood out to me was "Route Error" and that clearly doesn't help much. Thoughts? – DaBears Feb 9 '14 at 17:46
  • @DaBears - what's the full error you saw with "Inspector"? The full error message is often useful in debugging/helping. – Bjorn Svensson Feb 9 '14 at 22:00
  • @Bjorn- I fall on my sword.. I did not have the loop structured properly for generating multiple routes. it was working for the first stop but not the other stops and I have it working now. thank you for all of the insight though and I will give you some credit for pointing out helpful parameters I wasn't aware of on the routeparameter class – DaBears Feb 9 '14 at 22:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.