I have a COM addin I have written that iterates through the directions
on a route. For each direction it selects the direction, makes the map
jump to that direction, zooms out, then copies the map image to the
clipboard. I then use a VB ActiveX control to save the image as a JPG.
I end up with a bunch of html pages, each a direction, with a small
JPG map for each. I then transfer these onto my PDA for "Pocket
Directions". The code looks something like ...
iCurrentDirection = iCurrentDirection + 1
Set objDirection =
appMapPoint.ActiveMap.ActiveRoute.Directions(iCurr entDirection)
objDirection.Select
objDirection.Location.GoTo
objMap.ZoomOut
objMap.CopyMap
Picture1.Picture = Clipboard.GetData
SavePicture Picture1, strOutDir & "\" & strName & "\step" &
iCurrentDirection & ".bmp"
' code to open bmp in ActiveX control then save it as a jpg
It works if I have directions that are point to point, but I have
found a bug with the GoTo method when I add a waypoint. If I have 10
directions, and there is a waypoint at direction 5, when I go to
direction 6 and call
appMapPoint.ActiveMap.ActiveRoute.Directions(6).Lo cation.Goto instead
of displaying the map for direction 6, it goes back to the start and
shows the map for direction 1. I have also tried using the WayPoints
collection and the SegmentDirections collection (breaking my
directions up into the Waypoint segments) like so ...
appMapPoint.ActiveMap.ActiveRoute.Waypoints(2).Seg mentDirections(1).Location.GoTo
but it has the same result as above - instead of jumping to the map
which is the first direction after the waypoint (direction 6) it jumps
to the map for direction 1.
Has anyone else seen problems with this method and it's behaviours
with Waypoints??