Route leg duration always the same as total duration.

Jan 6, 2010 at 6:01 PM

When using the VEarth.Directions component and I set up the route display using:

// Iterate through all route parts 
foreach (RouteLeg rl in rd.RouteLegs) 
{
       lstDirections.Items.Add(String.Format("{0} - {1} - {2}", rl.Description, rl.Distance, rl.Duration));

}

the duration is always the same as the total duration. Should not the rl.Duration be the time to travel rl.Distance?
Thanks.

Coordinator
Jan 10, 2010 at 5:55 PM

Hi

you are abolutely right! I have fixed the error and also will always return the duration in seconds. Then it is up tou you, as the developer, to decide in which format to display the duration. See the home page for the screenshot how i set up my sample application.

You're welcome.