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
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Route with highway's gives incorrect result

This is a discussion on Route with highway's gives incorrect result within the MapPoint Desktop Discussion forums, part of the Map Forums category; When determining (programmatically and manual) the route between two points (one point is positioned at a highway/motorway) the calculated result ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Route with highway's gives incorrect result

    When determining (programmatically and manual) the route between two points (one point is positioned at a highway/motorway) the calculated result of the route isn't ok.
    The route will be going straight across the map toward a local road instead to the highway exit.
    Moving the point at the highway a little the route is calculated correctly.

    Is it possible to get the correct route in one step?

  2. #2
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    This is a problem that may not have a solution.

    It always occurs when trying to route to or from a road of GeoRoadType geoRoadInterstate. These are described in the documentation as limited-access highways.

    I suppose this is essentially correct behaviour since you cannot actually join a motorway, or the US equivalent, except at junctions.

    However there doesn't seem to be any way to determine a roads GeoRoadType in advance and so program accordingly.

    If anyone knows of a solution I would be very interested.

    Roger

  3. #3
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    An interesting fact is when you move the stop located at the highway, after the route has been calculated (with a wrong result); Mappoint automatically recalculated the route and gives back the correct result.

    Iím looking how I can achieve this situation in my own code.

  4. #4
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Yes, I also discovered that and tried moving the waypoint in code.

    Problem was that although it was easy enough to move the waypoint a small amount and back again it did not produce the required effect.

    I could only acheive the required result by moving the waypoint with the mouse!

    If you have any success let me know.

    Roger

  5. #5
    BradB is offline Junior Member White Belt
    Join Date
    Sep 2009
    Posts
    4

    Re: Route with highway's gives incorrect result

    Quote Originally Posted by Anonymous View Post
    An interesting fact is when you move the stop located at the highway, after the route has been calculated (with a wrong result); Mappoint automatically recalculated the route and gives back the correct result.

    Iím looking how I can achieve this situation in my own code.

    Hate to brinp up an old thread.. but did anyone every get anywhere with this?

    I'm working on some software for highway construction, I need to route to the highway. I also have found if I move the end point on the highway with the mouse it calculates correctly.

  6. #6
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    Re: Route with highway's gives incorrect result

    No problem to bring up an old thread. But you're also welcome to start a new one if you think you are more likely to get attention and replies to your question..

    Can you post some screenshots to illustrate the issue? I am having trouble picturing it.

    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  7. #7
    BradB is offline Junior Member White Belt
    Join Date
    Sep 2009
    Posts
    4

    Re: Route with highway's gives incorrect result

    Eric,

    See the attached JPG.

    I'm using a Mappoint control in Visual Basic, creating a route between 2 waypoints. The "2"nd point ends on the highway. When the route is created (route.calculate) the result is displayed on the step 1 pic.

    In step 2, I've taken my mouse and highlighted waypoint 2. If I grab and move way point 2 just a little bit, then release the mouse button, mappoint recalulates the route.

    Which brings us to step 3, the route now calculates directly to the endpoint on the highway.

    In the above example the first "calculated Route" has a distance of 5.2 miles, the final and actual route is 4.0 miles, even through I only moved waypoint 2 .0001 miles. The move MUST happen with the mouse, if I move the waypoint via code and try a route.calculate, it goes back to step 1.

    I want to end up at step 3 without actually having to move the waypoint with the mouse.

    I worked on trying to find a way to cheat mappoint via code but couldn't make it happen. It's like the drag and drop on the mappoint control works differently than waypoints setup via code.

    I hope this explains the issue.
    Thanks
    Brad
    Attached Images Attached Images

  8. #8
    BradB is offline Junior Member White Belt
    Join Date
    Sep 2009
    Posts
    4

    Re: Route with highway's gives incorrect result

    I downloaded MapPoint 2k10 off of my MSDN account, same thing without even using the VB Control. I mean it does it just in normal mappoint....

    On the attached pic I created a starting point on a side street. Put the second point on the highway, and did a Route - Get Directions.

    As you can see the top pic it routes all the way around. If you drag the stopping point just a touch on the mappoint map, it redraws the route directly.

    I was able to make a fix but it's very crude. Basically being using the locationtoX and locationToY on the ending waypoint, I was able to find the X, and Y on the map, then figure out where that is on the screen, then using a couple of window APIs (mouse_event and SetCursorPos) I can mimic moving the waypoint and then move it back without user intervention, thus getting the correct route. Very ugly way to do things... there has to be a better way!!!
    Attached Images Attached Images
    Last edited by BradB; 09-23-2009 at 06:30 PM.

  9. #9
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60

    Re: Route with highway's gives incorrect result

    Have you looked at all your routing options and preferences?

    Richard
    Winwaed Software Technology LLC
    http://www.winwaed.com
    See http://www.mapping-tools.com for MapPoint Tools

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

    Re: Route with highway's gives incorrect result

    Hi,

    Yes, as Richard say, if I remember right the the routing / driving options are programaticly not the same as the ones a user can set in the mappoint window itself.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. printing: the parameter is incorrect if not geoPrintMap
    By Wilfried in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 11-19-2005, 02:16 AM
  2. Incorrect locations?
    By harris00 in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-25-2004, 10:40 PM
  3. Incorrect/Missing Actions for Routedirections
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 11-06-2003, 02:20 PM
  4. MapPoint Street Incorrect
    By cathsaigh in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 08-29-2002, 11:10 AM
  5. MapPoint is great in findig routes. One result of ....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-23-2002, 05:51 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 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 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127