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 get location points for a route

This is a discussion on How to get location points for a route within the MapPoint Desktop Discussion forums, part of the Map Forums category; I use next code for calculate a route between 2 location . var r : Route; loc1,loc2 : location; begin ...

1. Junior Member White Belt
Join Date
Oct 2007
Posts
11

## How to get location points for a route

I use next code for calculate a route between 2 location .

var r : Route;
loc1,loc2 : location;

begin

r:=Childform.Map1.ActiveRoute;
r.Calculate;

end;

This code draw the route between loc1 and loc2 , but I need to know the location of point between loc1 and loc2. (latitude,longitude for all points there are between loc1 and loc2)

thanks.

2. Member Yellow Belt
Join Date
Oct 2007
Posts
42

## Re: How to get location points for a route

This code analyses a route for a rest break and creates a location at the point, you could perhaps use it....
...
gobjRoute.Calculate
For x = 1 To gobjRoute.Directions.Count
If Left(gobjRoute.Directions.Item(x).Instruction, 10) = "Rest break" Then
Set oLoc(3) = gobjRoute.Directions.Item(x).Location
Exit For
End If
Next x