No styles are specified

294
2
04-23-2019 06:09 PM
jackzhong
New Contributor

When I use ArcGIS Runtime SDK for. NET for network analysis, I report "No styles are specified" error when I execute await RouteTask.CreateAsync(). What steps are wrong?

0 Kudos
2 Replies
MichaelBranscomb
Esri Frequent Contributor

Hi,

Please can you share your code?

Cheers

Mike

0 Kudos
jackzhong
New Contributor

stops.Add(new Stop((MapPoint)startData.Geometry));
stops.Add(new Stop((MapPoint)endData.Geometry));

RouteTask solveRouteTask = await RouteTask.CreateAsync(new Uri("http://27.154.234.238:6088/arcgis/rest/services/JC/netforspeed2/NAServer/Route"));
RouteParameters routeParams = await solveRouteTask.CreateDefaultParametersAsync();

routeParams.DirectionsStyle = DirectionsStyle.Desktop;
routeParams.ReturnStops = true;
routeParams.ReturnDirections = true;
routeParams.SetStops(stops);

RouteResult solveRouteResult = await solveRouteTask.SolveRouteAsync(routeParams);

0 Kudos