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
Results 1 to 8 of 8

Get direction from point a to point b???

This is a discussion on Get direction from point a to point b??? within the MapPoint Desktop 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 ...

  1. #1
    jonknapek is offline Junior Member White Belt
    Join Date
    Jul 2005
    Posts
    6

    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

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    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.

  3. #3
    jonknapek is offline Junior Member White Belt
    Join Date
    Jul 2005
    Posts
    6

    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

  4. #4
    jonknapek is offline Junior Member White Belt
    Join Date
    Jul 2005
    Posts
    6

    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

  5. #5
    Goldwings98SE is offline 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.

  6. #6
    jonknapek is offline Junior Member White Belt
    Join Date
    Jul 2005
    Posts
    6

    I'll give that a try...

    Thanks.
    Jon
    Jonathan Knapek

  7. #7
    Goldwings98SE is offline 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.

  8. #8
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    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?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Map Point Point Of Interest
    By Anonymous in forum Bing Maps and MapPoint Web Service
    Replies: 1
    Last Post: 02-14-2005, 09:19 AM
  2. New to MAP Point
    By Deepak in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-31-2004, 10:01 AM
  3. How can I find nearest point on a road from a point off-road
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-12-2002, 07:14 AM
  4. I am new to Map Point, and I am looking for the to....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-06-2002, 01:27 PM
  5. Using the Map Point API from VB I sometimes get th....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-05-2001, 12:34 PM

Tags for this Thread

Posting Permissions

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


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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96