×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    80

    distance between places in JavaScript

    Hi,

    I like to know the distance API in here map is it direct point to point distance in metre or actual distance of the road? Is there any option to give bicycle or car? Can anybody show some code example?
    Thanks

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: distance between places in JavaScript

    I have not checked the javascript API, anyway, most often Maps offerings implement the distance calculations in the Geo coordinate (or similar) class, so I would suggest you check the API docs for the class for any function available.

  3. #3
    Regular Contributor
    Join Date
    Aug 2011
    Location
    Berlin
    Posts
    288

    Re: distance between places in JavaScript

    Quote Originally Posted by aktarjahan2003 View Post
    Hi,

    I like to know the distance API in here map is it direct point to point distance in metre or actual distance of the road? Is there any option to give bicycle or car? Can anybody show some code example?
    Thanks
    You can calculate the distance between two points using the Haversine formula - the API uses an implementation of this in the nokia.maps.geo.Coordinate.distance() method. Distances retrieved are in meters and "as-the-crow-flies". To get the distance by road you will need to invoke the RoutingManager

    The following archived thread should prove instructive on how to do this: http://developer.nokia.com/Community...gth-of-a-route

Similar Threads

  1. Nokia Places API FAQ
    By Nokia Ron in forum [Archived] Places API
    Replies: 1
    Last Post: 2013-04-25, 13:06
  2. Nokia Places API for Qt
    By vladest in forum Qt
    Replies: 4
    Last Post: 2012-09-08, 01:34
  3. API to get all the places in X-MAP-VIEWPORT
    By rajusb19 in forum [Archived] Places API
    Replies: 3
    Last Post: 2012-06-25, 16:39
  4. Welcome to the Nokia Places API
    By Nokia Ron in forum [Archived] Places API
    Replies: 0
    Last Post: 2012-03-29, 15:53

Posting Permissions

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