Community of VE/MapPoint 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 ...
| |||||||
| 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 |
![]() |
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 |
Family Ski Holidays France
Why not book family ski holidays in France? The diversity of French ski resorts are bound to have something to suit your family. Holiday Hypermarket will help you to finds great deals.
Cruise Travel Agent
Travel Counsellors is a leading Cruise Travel Agent. Visit the site to view details of your preferred Cruise Line.
Cape Town Flight
Book a Cape Town Flight for great value when you book through dealchecker.co.uk. It doesn't take long to find the latest great deals for you.
Barbados Holidays
Barbados holidays can be a wonderful break from the rat race or an exciting, action packed adventure. Plan the perfect holiday in Barbados.
Tunisia
Tunisia enjoys excellent weather, golden beaches and a beautiful blue sea. Moving away from the beach you will find a country that has a rich and varied past. Discover the secrets of history yourself by exploring all the ruins.
Travel
Before making a choice regarding travel, check out the amazing variety of options on Travel.co.uk.
Fuerteventura Holidays
Visit one of the closest Canary Islands to Africa! Book Fuerteventura holidays at On The Beach!