×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jan 2013
    Posts
    7

    Question 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. #2
    Regular Contributor
    Join Date
    Aug 2011
    Location
    Berlin
    Posts
    288

    Re: Unit of travelTime and length of RouteLeg

    Quote Originally Posted by inevitable1988 View Post
    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";
    				}
    		}
    }
    Quote Originally Posted by inevitable1988 View Post
    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
    Last edited by jasfox; 2013-03-21 at 12:25.

  3. #3
    Registered User
    Join Date
    Jan 2013
    Posts
    7

    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

Similar Threads

  1. UNIT HANG
    By mathew01 in forum General Development Questions
    Replies: 1
    Last Post: 2010-09-29, 13:32
  2. Replies: 3
    Last Post: 2009-09-16, 16:08
  3. Symbian OS Unit
    By nsunanda in forum General Development Questions
    Replies: 0
    Last Post: 2008-04-22, 13:07
  4. Replies: 0
    Last Post: 1970-01-01, 02:00

Posting Permissions

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