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 6 of 6

how to calculate de starting and finished point on a route

This is a discussion on how to calculate de starting and finished point on a route within the MapPoint Desktop Discussion forums, part of the Map Forums category; Any body know how to calculate de starting and finished point on a route segment the link below has a ...

  1. #1
    hidroela is offline Junior Member White Belt
    Join Date
    Jan 2005
    Posts
    4

    how to calculate de starting and finished point on a route

    Any body know how to calculate de starting and finished point on a route segment the link below has a detail picture

    http://home.earthlink.net/~hidroela/car%20system.htm


    Any help would be appreciated
    Best regards Hidroilio

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

    Yes. Each Direction object has a Location member. You find code to calcluate latutude and longitude from out of Location object here: http://www.mp2kmag.com/articles.asp?...xtract.lat.lon

  3. #3
    hidroela is offline Junior Member White Belt
    Join Date
    Jan 2005
    Posts
    4
    Hi Wilfried I think that I was not explicit enough below is a link to a detail figure of What I am trying to accomplish
    I need to calculate the latitude and longitude of the point 1,2,3,4

    When I calculate the route I only provide points 1 and 2
    Point 1 thought a gps receiver and point 2 as an address
    Best regards Hidroilio


    http://home.earthlink.net/~hidroela/map.gif

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

    I think I understeand right (I hope), but I also think I explained bad

    Code:
                Map      M = MP.ActiveMap;
                Route    R = M.ActiveRoute;
                R.Clear();
    Now you set start, via and end points. Then you calculate the route:

    Code:
                Directions dir = R.Directions;
                foreach (MapPoint.Direction d in dir) {
    Here every Direction has a property Location. From this one you can calculate lat/long of it. Your GPS coordinates compare to them and you can give appropriate instructions. Of course you have to put each Direction point in a dataset or so, and know if you past it or not, and also if driver choose another road.

    Does I make more sence her ?

  5. #5
    hidroela is offline Junior Member White Belt
    Join Date
    Jan 2005
    Posts
    4
    Hi Wilfried

    Thanks for you replay, now I understand what you was trying to explain on your last post but I already got this answer in another forum with the difference that yours is a liter bet more elaborated
    But like Mr. guilles point out on that forum

    <<Hmm, while there is a Location property in the "Direction" object, I'm
    afraid it will only provide the center of the corresponding segment
    (if you're lucky), not the beginning or end ...>>>>

    that approaches did not really help me out to much first at all it did not return the edges instead the middle point and some times it is not accurate

    any ways thanks
    best regards
    Hidroilio


    this is a picture of and example

    http://home.earthlink.net/~hidroela/map2.gif

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

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Calculate route
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 03-16-2005, 01:42 PM
  2. Finding the Starting Point of a Route
    By Anonymous in forum MP2K Magazine Articles
    Replies: 9
    Last Post: 10-14-2003, 10:43 PM
  3. How do I calculate a route distance without displaying route
    By spideybud in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 09-09-2003, 11:14 AM
  4. Calculate route
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 07-03-2003, 03:25 AM
  5. how can I calculate the distance between two moving point
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 04-30-2003, 10:09 AM

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