
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