Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

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

 Subscribe to receive our newsletter. Subscribe Unsubscribe

## Route direction TURNS location

This is a discussion on Route direction TURNS location within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, Regarding the fact that the Mappoint gives a best view location of a direction segment, instead of an exact ...

1. Junior Member White Belt
Join Date
Aug 2006
Posts
8

## Route direction TURNS location

Hi,

Regarding the fact that the Mappoint gives a best view location of a direction segment, instead of an exact location, i have a question :

I have read and tried a lot lately trying to find the beginning (location) of of route segment, to be able to guide a driver along a route but so far nothing worked out.

Has anybody ever wondered how Chun li-Pu's addin AGPS for mappoint is
able to give route Turn information, and guide the driver ??

I did send an email to Chun but i did'nt get any response ....

Any ideas ????

Best regards, Ulti

2. I haven't tried AGPS, but is the route turn information, simply the directions that MapPoint produces? These are listed with the route segments and sub-segments.

Richard

3. Junior Member White Belt
Join Date
Aug 2006
Posts
8
Hi Richard,

AGPS is capable of displaying turn based information within a 50 or so meters of the turn and on the turn that has to be taken itself, i therefore think the author is able to get the (near) exact location of the start of a route segment.

And i'm wondering how he does just that. I know that
directions.item(x).location gives the best view location, instead of the exact location.

I'm trying to give a driver a "TURN LEFT HERE" message while driving a route 50 meters before the actual left turn ...

I hope you understand what i mean ...

Thanks for the reply !

4. One scheme I tried a while ago was to interpolate/extrapolate the segment engs - but you must assume that the segment is a straight line and the location provided by MP is the mid-point.

Under many circumstances that would work very well. Is it possible that AGPS is doing something similar?

Another approach and probably more reliable approach for your specific question, would be to find the distance form the GPS location to the route segments. Whcih is the closest? If two adjacent segments are both very close (50m?) then you're near the change from one to the other.

Richard

5. Junior Member White Belt
Join Date
Aug 2006
Posts
8
Great thinking Richard !

I going to experiment with the distance to route segments option...

Regarding the AGPS software : AGPS is run as an addin from within Mappoint, the exact locations of the route segment turns are not available to us trough the axtiveX object, maybe they are when using a addin ??

Any ideas ?

I'll keep you informed ! Thanks for replying !

6. No, the choice of Addin or ActiveX does not make a difference. The "low level" interface and objects are identical for both. The only differences are the "big objects" - eg. Control vs. Application.

I did my route digitization experiments using the "Application" interface, invoking MapPoint as a standalone application.

Richard

7. Junior Member White Belt
Join Date
Aug 2006
Posts
8
Hi Richard,

Thanks for your intrest ! I'm using the MP control from within my own application.

I've been busy experimenting with your route segments idea. While playing
around i think i found a usable workaround to the whole best view VS exact location problem. Using GPS position, and 2 location objects, i move the start waypoint of a route every 10 meters, and calculate a new route.

The directions.item(1).distance property gives the distance to travel until the next direction instruction. By moving the first waypoint this distance decreases ( if you follow the route, that is). When the distance is smaller then 50 meter or so, i display the next direction instruction.

It will need some cleaning and further experimenting but i think this
is usable. It will only give me "hard" direction instructions, for example Turn Left, road name changes ..... I still have to figure out what to do with the instructions that are not expanded ....

I'll keep you informed of my progress, if still intrested .....

Best regards, Ulti

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

I'll keep you informed of my progress, if still intrested .....
Yes please because this is very interesting.

9. Junior Member White Belt
Join Date
Aug 2006
Posts
8
Hi Wilfried,

ok, i will post my finding here ...

Did some testing on tuesday, for now it is working exactly as i thought it would. The only thing is that the re-calculation a route sets the zoom to display the entire (new) route. So, by moving the start waypoint with every new gps coordinate the map is flashing like crazy. Also the itinerary windows comes up every calculation.

I've added a second control which contains the entire original route, and the current position from my gps coodinate. The first control does the movement of waypoint 1 and route calculation, in order to display the turn instructions before you actually need to make the turn.

This control is not visible. The directions.distance value is monitored and when the distance to the instruction is doubled you probably missed the turn, a new route is calculated for both controls, displaying a new drive possibility on the control that is visible.

I hope you can follow what it is trying to accomplish here...
When i'm busy programming everything makes sense, but to communicate your thoughts is something else ....

Thanks !

Best regards, Ulti
Last edited by ultiblade; 08-30-2006 at 05:16 AM.

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

Yes it make sense Looks a good idea and I'm glad it works as expected. You can set ItineraryVisible to false to not display the drive directions. You can do that also in the inviseble control. Possible it decrease the calculation time a little.

Page 1 of 2 12 Last

#### Thread Information

##### Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•