Hello,
I'm developing an app in Visual Studio Xamarin environment with ArcGIS Runtime SDK for .NET.
This app use a Network Analysis service that I created from a GTFS network dataset.
Sometimes I want to exclude from the route calculation the public transport lines.
In ArcMap, when I use the Find Route tool in the Options tab of the Find Route dialog, I just uncheck "Use trip start" and the route is calculated correctly without transit lines.
In my app I try to replicate this behavior with the following code
...
RouteParameters routeParams = await solveRouteTask.CreateDefaultParametersAsync();
// set the routeParams.StartTime parameter only if _appSettings.useStarTime is true
if (_appSettings.useStartTime)
routeParams.StartTime = DateTimeOffset.Now;
else
routeParams.StartTime = null;
...
but it doesn't work, and the resulting route always takes into account transit lines.
Can anyone suggest a solution?
Many thanks
Massimo
A better way to accomplish this would be to create a network restriction that forbids travel on transit lines. Then, create a travel mode for walking with no transit. When you publish your service, the user can select either the transit+walk travel mode or the walk-only travel mode.