MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




Is there any event for when the route is changed?

This is a discussion on Is there any event for when the route is changed? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Is there any event generated or any other way of knowing when the route has been changed?...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-30-2005
Member
Yellow Belt
 
Join Date: Jun 2004
Posts: 36
Is there any event for when the route is changed?

Is there any event generated or any other way of knowing when the route has been changed?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 08-30-2005
Winwaed's Avatar
Mapping-Tools.com
Black Belt
 
Join Date: Feb 2004
Posts: 1,142
Blog Entries: 22
There's the RouteAfterCalculate event, which is called with the route object as a parameter - see the Help file for documentation.

I see there's also a RouteAfterOptimize() which will work in a similar manner.
(you might want to trap both of them)


Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
See the Geoweb Guru for online mapping
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 08-30-2005
Winwaed's Avatar
Mapping-Tools.com
Black Belt
 
Join Date: Feb 2004
Posts: 1,142
Blog Entries: 22
Those will tell you when MapPoint has modified a route.

Trapping when the user has modified a route might be a bit more difficult.
Perhaps check the number of waypoints in the route? Have they been added or removed?


Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
See the Geoweb Guru for online mapping
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 08-30-2005
Member
Yellow Belt
 
Join Date: Jun 2004
Posts: 36
Thanks for that but I really need to know when the user either removes or adds an item to the route.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 11-25-2005
Junior Member
White Belt
 
Join Date: Nov 2005
Posts: 10
Send a message via ICQ to oschulz
There is property called "IsCalculated". Thats what you need.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 11-25-2005
Member
Yellow Belt
 
Join Date: Jun 2004
Posts: 36
I needed an actual event not a property, i.e. to be notified as soon as a waypoint is added or removed and what the waypoint was.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 11-25-2005
Junior Member
White Belt
 
Join Date: Nov 2005
Posts: 10
Send a message via ICQ to oschulz
There is no event that will do that so easy . I have used the OnAfterRedraw-event. When a waypoint is added, the map is redrawed. Maybe you use an own temp route list and compare it with the Mappoint routelist. Then you have the waypoint position which is changed.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 11-25-2005
Member
Yellow Belt
 
Join Date: Jun 2004
Posts: 36
thanks for that suggestion - ii will try it out
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9 (permalink)  
Old 11-28-2005
Junior Member
White Belt
 
Join Date: Nov 2005
Posts: 10
Send a message via ICQ to oschulz
I have try out the SelectionChange event, thats better for your Problem i think. That event occurs, for example when a new waypoint is added .
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10 (permalink)  
Old 11-28-2005
Junior Member
Yellow Belt
 
Join Date: Jan 2003
Posts: 17
Send a message via ICQ to brianmcg
How about using the SelectionChange event? You can test for TypeOf is WayPoint then do your stuff:

Code:
Private Sub map_SelectionChange(ByVal pNewSelection As Object, ByVal pOldSelection As Object)
    
    If TypeOf pNewSelection Is Waypoint Then
        '   check to see if it's an addition or deletion, etc
        If map.ActiveMap.ActiveRoute.Waypoints.Count > oldcount Then
            '   if it's an addition
        ElseIf map.ActiveMap.ActiveRoute.Waypoints.Count < oldcount Then
            '   if it's a deletion
        End If
    End If
    
End Sub
__________________
Brian McGrath
CAD North Inc.
http://www.cadnorth.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
changed, event, route


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Exporting Changed data back to Excel kbeese MapPoint 2006/2009 Discussion 0 05-17-2005 03:57 PM
Where is the Quit event? Anonymous MapPoint 2006/2009 Discussion 3 04-08-2005 07:36 AM
mouse down event henemonster MapPoint 2006/2009 Discussion 1 03-31-2003 02:04 PM
Can the geography reference be changed in the MapP.... Anonymous MapPoint 2006/2009 Discussion 1 05-31-2002 04:42 PM
Several Postcodes in England have now been changed.... Anonymous MapPoint 2006/2009 Discussion 1 05-13-2002 07:52 AM


All times are GMT -5. The time now is 01:46 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Ibiza Holiday
Visit the party capital of Europe with an Ibiza holiday! Check out the deals online on UlookUbook...



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