# Thread: Unit of travelTime and length of RouteLeg

1. ## Unit of travelTime and length of RouteLeg

nokia.maps.routing.RouteLeg () has two properties :- travelTime and length....

I want to know the unit in which length returns value (in meters or in foots.....?)
I want to know the unit in which travelTime returns value (in seconds or in minutes....?)

I tried to find
routing.Route.legs[0].travelTime for half kilometer on map.....
and I got 32 value for travelTime...

for routing.Route.legs[0].length i got 491
I dont know the unit of length or travelTime...!

I know travelTime & length depends on transport mode,traffic mode.....

2. ## Re: Unit of travelTime and length of RouteLeg

Originally Posted by inevitable1988
I want to know the unit in which length returns value (in meters or in foots.....?)
Metres, it is the only unit which makes sense for convertions - your 1/2 km route is actually 7 metres short of 0.5 km - you can convert to imperial units as shown:

Code:
```function calculateDistance(distance){
if (metricMeasurements){
if (distance < 1000){
return "" + maneuver.length + " m.";
} else {
return "" + Math.floor(distance/100)/10 + " km.";
}
} else {
if (distance < 1610){
return "" + Math.floor(distance/1.0936) + " yards";
} else {
return "" + Math.floor(distance/160.934)/10 + " miles";
}
}
}```
Originally Posted by inevitable1988
I want to know the unit in which travelTime returns value (in seconds or in minutes....?)
....I got 32 value for travelTime...
Seconds, again the smallest unit is used to enable simple convertions - 497 metres in 32 seconds is about 50km/h or 30mph

3. ## Re: Unit of travelTime and length of RouteLeg

sorry for asking such a silly question... but i wanted to confirm because, in google map it shows 7 minutes to travel 5 km route and in Nokia maps it shows 300 seconds to travel that 5 km route... considering traffic mode "enabled" in mode...
Thanks for supporting

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•