MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




how to calculate distance between 2 towns

This is a discussion on how to calculate distance between 2 towns within the MapPoint 2006/2009 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...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-22-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 02-23-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 06-04-2003
Val Val is offline
Junior Member
White Belt
 
Join Date: Dec 2002
Posts: 8
Send a message via MSN to Val
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 06-06-2003
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
calculate, distance, towns


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

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


All times are GMT -5. The time now is 02:03 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Dalaman Holiday
Enjoy a wonderfully peaceful Dalaman holiday... Book through UlookUbook and save!



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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59