MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Get direction from point a to point b???

This is a discussion on Get direction from point a to point b??? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I am trying to mimick some functionality that GeoMap provides. You can set a home location and a destination and ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-02-2005
Junior Member
White Belt
 
Join Date: Jul 2005
Posts: 6
Send a message via AIM to jonknapek
Get direction from point a to point b???

I am trying to mimick some functionality that GeoMap provides. You can set a home location and a destination and GeoMap will display a small icon with two small dots on it. This allows the user to establish the general direction of point 'b' to point 'a'. You can then click on the icon to get a full map. Is there a way to do this in MapPoint 2004? If I could at least get MapPoint to give me a direction (North, south, etc...) then I could set the appropriate icon.

Thanks
__________________
Jonathan Knapek
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 07-04-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Hi Jonathan,

You do not mean a route planning, just the direction in degrees from point a to point b, is that correct ?

Further you can do what you want to do in OnBeforeClick event handler. There you know the x,y coordinates of where the user has clicked and can do the calculation and display.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 07-05-2005
Junior Member
White Belt
 
Join Date: Jul 2005
Posts: 6
Send a message via AIM to jonknapek
I'm talking about a literal direction (North, South, etc...

I figured out how to plan a route, but I still haven't figured out how to extract a literal direciton. I need to use the direction from point a to point b to decide what Icon to display on the screen.

Thanks,
Jonathan
__________________
Jonathan Knapek
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 07-07-2005
Junior Member
White Belt
 
Join Date: Jul 2005
Posts: 6
Send a message via AIM to jonknapek
Calculating degrees...

So if I can get the Longitude and Latitude of each location, then I should be able to calculate the + or - degrees from point a to point b and derive a compass direction from that?

Has anyone done this before?
Thanks.
__________________
Jonathan Knapek
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 07-07-2005
Junior Member
White Belt
 
Join Date: Jun 2005
Posts: 4
Routing should give you the direction

I think if you tell MapPoint to route from 1 location to another it will also give you the direction you need to go:

oRoute.Waypoints.Add oMap.FindPushpin(RoutePoint(g - 1))
oRoute.Waypoints.Add oMap.FindPushpin(RoutePoint(g))
oRoute.Calculate


From that you should be able to pick up if your going North VS South or East VS West, etc.

Hope it helps.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 07-07-2005
Junior Member
White Belt
 
Join Date: Jul 2005
Posts: 6
Send a message via AIM to jonknapek
I'll give that a try...

Thanks.
Jon
__________________
Jonathan Knapek
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 07-07-2005
Junior Member
White Belt
 
Join Date: Jun 2005
Posts: 4
Re: Routing should give you the direction

Quote:
Originally Posted by Goldwings98SE
I think if you tell MapPoint to route from 1 location to another it will also give you the direction you need to go:

oRoute.Waypoints.Add oMap.FindPushpin(RoutePoint(g - 1))
oRoute.Waypoints.Add oMap.FindPushpin(RoutePoint(g))
oRoute.Calculate


From that you should be able to pick up if your going North VS South or East VS West, etc.

Hope it helps.

I probably should have described it better.
I put my plotted pins on the map in an array. Then I just calculate the driving directions with the oRoute.Calculate method. Then the results from the oRoute.Calculate is easily put to a flex grid. It should provide the info you need to get the direction of travel.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 07-09-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Re: Calculating degrees...

Hi,

Quote:
Originally Posted by jonknapek
So if I can get the Longitude and Latitude of each location, then I should be able to calculate the + or - degrees from point a to point b and derive a compass direction from that?
If you means the direction (like a compass) from point a to poiint b then Yes several times. Do you wants code example from i t?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
direction, point


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Map Point Point Of Interest Anonymous MapPoint Web Service and Virtual Earth 1 02-14-2005 09:19 AM
New to MAP Point Deepak MapPoint 2006/2009 Discussion 1 03-31-2004 10:01 AM
How can I find nearest point on a road from a point off-road Anonymous MapPoint 2006/2009 Discussion 1 11-12-2002 07:14 AM
I am new to Map Point, and I am looking for the to.... Anonymous MapPoint 2006/2009 Discussion 1 07-06-2002 01:27 PM
Using the Map Point API from VB I sometimes get th.... Anonymous MapPoint 2006/2009 Discussion 1 09-05-2001 12:34 PM


All times are GMT -5. The time now is 08:48 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55