Select to view content in your preferred language

Is there a simple way to determine which barriers were routed around in RouteTask?

757
1
06-13-2017 06:59 PM
ClayGinn
Emerging Contributor

I need to be able to determine if the barriers which were passed in through RouteParameters were utilized. Is there a simple way to return this information, or is it not tracked by RouteTask?

0 Kudos
1 Reply
NagmaYasmin
Esri Contributor

Hi Clay,

RouteTask.SolveRouteAsync() returns the Task<RouteResult>

If you have a point barrier, you need to set RouteParams.ReturnPointBarriers to true to get the barrier information from the RouteResult.

RouteParams.ReturnPointBarriers = true; // PointBarriers
var routeResult = await RouteTask.SolveRouteAsync(RouteParameters)

Hope that helps.

Nagma

0 Kudos