Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 4 of 4

how to calculate distance between 2 towns

This is a discussion on how to calculate distance between 2 towns within the MapPoint Desktop Discussion forums, part of the Map Forums category; I m a newbie and i want calculate distance between 2 towns in asp or vb how to do? thank...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    how to calculate distance between 2 towns

    I m a newbie and i want calculate distance between 2 towns in asp or vb
    how to do?
    thank

  2. #2
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    how to calculate distance between 2 towns

    Hi :o)

    I have the same problem but in c#
    Also I need to know the time it take to drive based on speed limit.

    So:
    How do I get the distance?
    How do I set the speed limits on different road type?
    How do I get the time it take to drive the distance?

    Please help me

    Thanks in advance

    Zindy

  3. #3
    Val
    Val is offline Junior Member White Belt
    Join Date
    Dec 2002
    Posts
    8
    Hi,

    First, you declare 2 objects like "MapPoint.Location": Loc1 and Loc2

    You will have to localise two place (with the "FindAddressResults" method or the "FindResults" methode of a Map).
    With this methode, you receive a list of place. You take one and you place them in the Loc1 and the Loc2.

    Then, you call the "oMap.distance(Loc1, Loc2)" method of Map that return a Double.
    If you have any problem, call me !!

    Bye.

  4. #4
    aarunprakash is offline Junior Member White Belt
    Join Date
    Jun 2003
    Posts
    2
    I think there are quite a few ways of doing it:

    1. Method suggested by Val
    2. Use Loc1.DistanceTo(Loc2)
    3. Add the locations as waypoints of a route. then use route.calculate and Route.distance

    the first two methods give the same distance. however the 3rd one gives a different distance(the actual travel distance i guess). I am not sure as to why each of these methods give different numbers. can anyone help?

    thanks,

    arun.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to calculate distance using Mappoint and VB
    By digish in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 02-27-2004, 03:40 PM
  2. How to calculate distance between 2 location with vba
    By ifc in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 02-25-2004, 08:01 AM
  3. [VB6 + MP2K] How to calculate distance between...
    By Vincent BENNER in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-19-2003, 11:59 AM
  4. So how do i get it to calculate teh distance betwe....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 12-19-2001, 07:42 AM
  5. I would like to calculate the distance from multip....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 10-31-2001, 03:39 AM

Tags for this Thread

Posting Permissions

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


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25