Community of MapPoint and Virtual Earth Users and Developers
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...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| 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 |
| |||
|
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. |
| |||
|
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. |
![]() |
| Tags |
| calculate, distance, towns |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| 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 |
Dalaman Holiday
Enjoy a wonderfully peaceful Dalaman holiday... Book through UlookUbook and save!