Community of MapPoint and Virtual Earth Users and Developers
This is a discussion on I am trying to write some code which mimicks the b.... within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I am trying to write some code which mimicks the behaviour of clicking on a direction line in a calculated ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| I have tried the following code: Dim oMap As MapPoint.Map Dim oRte As MapPoint.Route Set oMap = GetObject(, "MapPoint.Application").ActiveMap Set oRte = oMap.ActiveRoute oRte.Waypoints.Add oMap.FindAddressResults(, "London", , ) (1) oRte.Waypoints.Add oMap.FindAddressResults(, "Birmingham", , ) (1) oRte.Calculate Dim i As Integer Dim loc As MapPoint.Location For i = 1 to oRte.Directions.Count loc := oRte.Directions.Item[i].Location loc.GoTo loc.Highlight = true MsgBox "Here is a turn" Next i This runs, but the behaviour is not as expected. The locations returned display larger sections of the route, and is centered on what seems an arbitary point, there is no highlighting, and no pushpin. Can anyone help with reproducing this behaviour. Thanks Brian |
| |||
|
Try "oRte.Directions(i).Select". For example: Sub Test() Dim oMap As MapPoint.Map Dim oRte As MapPoint.Route Set oMap = GetObject(, "MapPoint.Application").ActiveMap Set oRte = oMap.ActiveRoute oRte.Waypoints.Add oMap.FindResults("Seattle, Washington")(1) oRte.Waypoints.Add oMap.FindResults("Tacoma, Washington")(1) oRte.Calculate oRte.Directions(2).Location.GoTo oRte.Directions(2).Select End Sub |
![]() |
| Tags |
| code, mimicks, write |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using MapPoint to write to database | strattonn | MapPoint 2006/2009 Discussion | 4 | 11-24-2003 09:51 PM |
| I am trying to write code that centers the map on .... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 06-19-2002 04:18 AM |
| I write an application that similar to find functi.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 03-09-2002 10:48 PM |
| I'm trying to write a VB MapPoint app that assists.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 08-26-2001 09:56 AM |
| I am attempting to write a com addin for mappoint .... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 03-14-2001 09:44 AM |
Dalaman Holiday
Enjoy a wonderfully peaceful Dalaman holiday... Book through UlookUbook and save!