I m a newbie and i want calculate distance between 2 towns in asp or vb
how to do?
thank
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...
I m a newbie and i want calculate distance between 2 towns in asp or vb
how to do?
thank
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)