Welcome to MapForums!

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

## how to calculate de starting and finished point on a route

This is a discussion on how to calculate de starting and finished point on a route within the MapPoint Desktop Discussion forums, part of the Map Forums category; Any body know how to calculate de starting and finished point on a route segment the link below has a ...

1. Junior Member White Belt
Join Date
Jan 2005
Posts
4

## how to calculate de starting and finished point on a route

Any body know how to calculate de starting and finished point on a route segment the link below has a detail picture

Any help would be appreciated
Best regards Hidroilio

2. Senior Member Black Belt
Join Date
Nov 2004
Location
Belgium
Posts
2,433
Hi Hidroilio,

Yes. Each Direction object has a Location member. You find code to calcluate latutude and longitude from out of Location object here: http://www.mp2kmag.com/articles.asp?...xtract.lat.lon

3. Junior Member White Belt
Join Date
Jan 2005
Posts
4
Hi Wilfried I think that I was not explicit enough below is a link to a detail figure of What I am trying to accomplish
I need to calculate the latitude and longitude of the point 1,2,3,4

When I calculate the route I only provide points 1 and 2
Point 1 thought a gps receiver and point 2 as an address
Best regards Hidroilio

4. Senior Member Black Belt
Join Date
Nov 2004
Location
Belgium
Posts
2,433
Hi Hidroilio,

I think I understeand right (I hope), but I also think I explained bad

Code:
```            Map      M = MP.ActiveMap;
Route    R = M.ActiveRoute;
R.Clear&#40;&#41;;```
Now you set start, via and end points. Then you calculate the route:

Code:
```            Directions dir = R.Directions;
foreach &#40;MapPoint.Direction d in dir&#41; &#123;```
Here every Direction has a property Location. From this one you can calculate lat/long of it. Your GPS coordinates compare to them and you can give appropriate instructions. Of course you have to put each Direction point in a dataset or so, and know if you past it or not, and also if driver choose another road.

Does I make more sence her ?

5. Junior Member White Belt
Join Date
Jan 2005
Posts
4
Hi Wilfried

Thanks for you replay, now I understand what you was trying to explain on your last post but I already got this answer in another forum with the difference that yours is a liter bet more elaborated
But like Mr. guilles point out on that forum

<<Hmm, while there is a Location property in the "Direction" object, I'm
afraid it will only provide the center of the corresponding segment
(if you're lucky), not the beginning or end ...>>>>

that approaches did not really help me out to much first at all it did not return the edges instead the middle point and some times it is not accurate

any ways thanks
best regards
Hidroilio

this is a picture of and example

6. Senior Member Black Belt
Join Date
Nov 2004
Location
Belgium
Posts
2,433
Hi Hidroilio,

If you need additional help just yell here