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

Clear previous itinerary

This is a discussion on Clear previous itinerary within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, After Calculating an itinerary, how to clear it from the map? Do I close the map and open it ...

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

    Clear previous itinerary

    Hi,

    After Calculating an itinerary, how to clear it from the map?

    Do I close the map and open it again, or there is a method like

    CloseAllItinerary


    Thanks in advance for any help

    Aurelia
    [/quote][/code]

  2. #2
    John Meyer's Avatar
    John Meyer is offline Senior Member Blue Belt
    Join Date
    Jul 2002
    Posts
    478
    This is a sample from the help file.

    Code:
    Sub ClearCalculatedRoute()
    
      Dim objApp As New MapPoint.Application
      Dim objMap As MapPoint.Map
      Dim objRoute As MapPoint.Route
    
      'Set up the application
      Set objMap = objApp.ActiveMap
      Set objRoute = objMap.ActiveRoute
      objApp.Visible = True
      objApp.UserControl = True
    
      'Add route stops and calculate the route
      objRoute.Waypoints.Add objMap.FindResults("Seattle, WA").Item(1)
      objRoute.Waypoints.Add objMap.FindResults("Redmond, WA").Item(1)
      objRoute.Calculate
    
      'Now clear the route
      objRoute.Clear
    
      End Sub

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

    Clear Itinerary

    Hi,

    Thanks John for your answer.

    What I need is not to clear an itinerary just after calculating.
    I want to let an itineary on the map and to clear it only if I calculate a new
    one or by clicking a button or getting the old itinerary with a method like objRoute.Selection .

    The idea I have now is save my addresses in some global variables. But I have to calculate my old itinerary again defore clearing it.

    Any other ideas?

    Regards
    Aurelia

  4. #4
    John Meyer's Avatar
    John Meyer is offline Senior Member Blue Belt
    Join Date
    Jul 2002
    Posts
    478
    No problem, just get a hook to the ActiveRoute and use the clear method.

    Set objRoute = objMap.ActiveRoute
    objRoute.Clear

  5. #5
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Thanks John, It was so easy !

    Aurelia

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Create Itinerary with VB.net
    By Genamo in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 02-20-2006, 05:08 PM
  2. Type of itinerary
    By ifc in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 04-28-2004, 09:32 AM
  3. Clear Push Pin
    By joshnfay in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 04-26-2003, 10:07 PM
  4. How do I prevent old/previous entries that I typed....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-11-2002, 01:10 PM
  5. 27/10/01 Thanks for your previous answer but the ....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 10-27-2001, 12:42 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