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

Trace route

This is a discussion on Trace route within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hello, I would like to know if there is a way to trace a line on a map with Mappoint ...

  1. #1
    giaarcix is offline Junior Member Yellow Belt
    Join Date
    May 2006
    Posts
    13

    Trace route

    Hello,
    I would like to know if there is a way to trace a line on a map with Mappoint 2004 between two or more points with VB6.
    I need to do so because if I trace a route with the "objMap.ActiveRoute" knowing only some points that are not so close to each other, the calculated route is often wrong.
    So I would prefere to show the points and trace some straight lines between them.
    I hope I have been clear...
    Thank you!
    Giacomo from Italy
    Bisogna sognare, insistere, ripetere, finchŔ il sogno si trasformi in realtÓ

  2. #2
    Mohamed is offline Member Green Belt
    Join Date
    Mar 2005
    Posts
    97
    Hi,

    The match of football between Italy and Ghana was exitant yesterday.

    Concerning your post, you have this example in Mappoint Help File:

    Code:
    Sub AddLineToMap()
    
      Dim objApp As New MapPoint.Application
      Dim objMap As MapPoint.Map
      Dim objLoc1 As MapPoint.Location
      Dim objLoc2 As MapPoint.Location
    
      'Configure l'application
      Set objMap = objApp.ActiveMap
      objApp.Visible = True
      objApp.UserControl = True
    
      'Obtient deux lieux et les agrandit
      Set objLoc1 = objMap.FindResults("Seattle, WA").Item(1)
      Set objLoc2 = objMap.FindResults("Redmond, WA").Item(1)
      Set objMap.Location = objLoc1
    
      'Ajoute un trait reliant les deux lieux
      objMap.Shapes.AddLine objLoc1, objLoc2
    
      End Sub
    Ciao

  3. #3
    giaarcix is offline Junior Member Yellow Belt
    Join Date
    May 2006
    Posts
    13

    and to delete all the shapes?

    Ciao!
    Thank you very much!!!
    You're right, I just had to look at the help... sorry!
    Now another question (I'm sure it's very simple for you...): how can I delete every shape from the map (I need something like a 'objmap.deleteAllShapes')?
    For example, to delete all my pushpins I use this:

    Dim objDataSet As MapPointctl.DataSet
    For Each objDataSet In objMap.DataSets
    If objDataSet.name = "Simboli" Then
    objDataSet.Delete
    Exit For
    End If
    Next

    But it does'nt work with shapes!
    Thank you and.... FORZA ITALIA!!
    Bye, Giacomo
    Bisogna sognare, insistere, ripetere, finchŔ il sogno si trasformi in realtÓ

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

    Code:
    Shapes shapes = MP.ActiveMap.Shapes;
    foreach (Shape s in shapes)
        s.Delete();

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Restrictions Webbased GPRS Track & Trace
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 05-24-2004, 10:27 AM
  2. 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
  3. trace my positiom
    By bchara in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 08-06-2002, 08:40 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