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

Mechanism for drawing routes

This is a discussion on Mechanism for drawing routes within the MapPoint Desktop Discussion forums, part of the Map Forums category; I want to programmatically draw routes between multiple locations on the map. Does any one know how Mappoint draw the ...

  1. #1
    Vic
    Vic is offline Junior Member White Belt
    Join Date
    Aug 2002
    Posts
    3

    Mechanism for drawing routes

    I want to programmatically draw routes between multiple locations on the map. Does any one know how Mappoint draw the routes on a map. I know that when you do a calculate on a route object, MP automatically draws the route for you. Can I do something similar on a collection of locations that are not part of a route object?

    My ultimate goal is to display multiple routes on a map, but I do not want to draw straight lines through my locations.

    Thanks in advance - Vic

  2. #2
    John Meyer's Avatar
    John Meyer is offline Senior Member Blue Belt
    Join Date
    Jul 2002
    Posts
    478
    Vic,

    Is there a reason that the route calculate will not work for you?

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

    Route.calculate works for diplaying a single route. I want to be able to display MULTOPLE routes on a sigle map. I was unable to find a way to make a collection of multiple route objects assciated to a single map object.

    I am hoping if I new how the internals of the route drawing routine works, I may be able to display my own set of routes on a map.

    -Vic

  4. #4
    John Meyer's Avatar
    John Meyer is offline Senior Member Blue Belt
    Join Date
    Jul 2002
    Posts
    478
    I can't think of an easy way to do this unless you have an array of lat/lon along the route like from a gps.

    Just in case you haven't seen this article: Merging Multiple Routes

    http://www.mp2kmag.com/articles.asp?ArticleID=72

  5. #5
    Vic
    Vic is offline Junior Member White Belt
    Join Date
    Aug 2002
    Posts
    3
    John:

    Let me know of your not easy way to accomplish my objective. I do have GPS coords of the stops within a route. However they are at sparse locations. I do not want to draw a straight line between them.

    I am thinking if there is a way to obtain more waypoints (programmatically) between each of the waypoints that I already have, then I could draw the route using the shape/line primitives supplied by Mappoint.

    Does anybody know how to find intermediate locations along route stops. Example, I have a route with a starting point and an ending point. Is there a way to get from Mappoint other locations along the route.

  6. #6
    John Meyer's Avatar
    John Meyer is offline Senior Member Blue Belt
    Join Date
    Jul 2002
    Posts
    478
    Well, I don't have solution but one idea might be:

    1 use the waypoint.add method and calculate a route (behind the scenes)

    2. enumerate the directions. The directions collection has a location property.

    Now the hard part. Some how you need to follow the road getting lat/lon along the way, maybe every one tenth of a mile? You might be ale to use some logic from Walt Cygan's Reverse Geocoding, Pt. III article. You give his routine a lat/lon and it "starts working outward in squares (spherical rectangles really) each 1-ten thousandth of point of latitude and longitude larger that the one before" Now he is looking for an address, you will be looking to see if you are still on the same road, heading is the right cardinal direction!

    Not impossible to do, but again I don't have the solution, just an idea!

    Anyway, I tried to see if the line drawn on the map showing the route was a shape that you could capture or otherwise work with but I have not found a way, there is nothing documented that I can see.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Drawing route as I go.
    By z_darius in forum MapPoint Desktop Discussion
    Replies: 6
    Last Post: 02-10-2006, 08:57 AM
  2. Drawing / Zoom
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 04-04-2005, 06:59 AM
  3. Drawing Tools
    By uspickle in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 01-13-2004, 08:51 AM
  4. Drawing shapes on the ocx
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 10-01-2002, 04:54 AM
  5. drawing tools
    By Anonymous in forum Wish List
    Replies: 0
    Last Post: 09-18-2002, 09:39 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