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

Ok, I've several questions.

1) If it's possi....

This is a discussion on Ok, I've several questions.

1) If it's possi.... within the MapPoint Desktop Discussion forums, part of the Map Forums category; Ok, I've several questions. 1) If it's possible, how can I retrieve all points (lat/lon) that belong to the road ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Ok, I've several questions.



    1) If it's possible, how can I retrieve all points (lat/lon) that belong to the road network?

    2) Again, if it's possible and from what I understood from my last question, how can I find a route between two points? What kind of struture will be the output? Does it contains what kind of roads are each segment?

    3) Does anyone can share with me some similar code that does what I pretend?



    Oh... And thanks for your feedback!

  2. #2
    Walt Cygan is offline Senior Member Green Belt
    Join Date
    Aug 2002
    Posts
    124
    Let me answer 2) first. The easiest way to get familiar with the object model for routes is to create a VB app with the MapPoint ActiveX control called "ctlMapPoint" and a Command button called "cmdTest", create a route on the map and step through the following code:


    Private Sub cmdTest_Click()

    On Error GoTo ErrSub

    Dim objRoute As MapPointCtl.Route

    Dim objWP As MapPointCtl.Waypoints

    Dim objDir As MapPointCtl.Directions

    Set objRoute = ctlMapPoint.ActiveMap.ActiveRoute

    Set objWP = objRoute.Waypoints

    Set objDir = objRoute.Directions

    ExitSub:

    Set objDir = Nothing

    Set objWP = Nothing

    Set objRoute = Nothing

    Exit Sub

    ErrSub:

    Resume ExitSub

    End Sub


    Each step in the driving direction contained in objDir has a location object as a property. You can then get lat/lon using Gilles Kohl's code available here.


    It doesn't appear to me as if the type of road for each segment is generated. MapPoint must have that information internally for the cost calculation, but it does not appear in the direction object.


    - Walt Cygan

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Display questions
    By dkart in forum MapPoint Desktop Discussion
    Replies: 13
    Last Post: 03-10-2008, 12:04 PM
  2. Update Questions
    By CulpPetroleumDispatch in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-24-2005, 04:05 PM
  3. pin map web graphic questions
    By clayromer in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-10-2004, 08:46 AM
  4. a few questions
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 7
    Last Post: 03-24-2003, 04:15 AM
  5. First of many newbie questions ;)
    By freditoba in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 08-05-2002, 12:08 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