PDA

View Full Version : Route Direction Location Instruction



disweij
10-16-2005, 06:26 PM
How can I get the Unknown Location of a Direction Instruction:

Sample vb code:

With Route.Directions.Item(x)
.Location =>
returns route segment midpoint of an imaginary straight line between segment start and end point, not the segment starting location.

.Instruction =>
returns the segment starting point instruction at the Unknown Location.
End With


I thought about creating a circle with:
center = Route.Directions.Item(x).Location
and
radius = segment distance / 2
but the segment distance is the total road distance and thus can not be used. Even if it could be used, as far as I know, no method exists to intersect a shape (circle) with the Route returning a collection of Locations.

Thanks in advance for any help.
DavidW

Wilfried
10-17-2005, 12:48 PM
Hi,

I dont understeand the question. Please refrase in simple English..

disweij
10-17-2005, 01:15 PM
Thanks for your speedy response.

I am looking for:
the exact Location of each Driving Instruction in a Route.

The Route.Directions.Item(x).Location does not give me the Location of the Instruction, but gives me the midpoint Location between the start and end point of Route segment x.

Hope this question is better phrased than my previous posting.
Thanks
DavidW

Winwaed
10-17-2005, 01:45 PM
It doesn't even do that. Usually it is pretty close to the mid-point between start and end, but it is actually the location required to get a "good view" of the route segment.

The location is the centre of such a view and also has the altitude (zoom) property set accordingly.

MapPoint doesn't openly expose locations that are exactly along a route.


Richard