View Single Post

  #2 (permalink)  
Old 02-26-2004
Eric Frost's Avatar
Eric Frost Eric Frost is offline
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 2,480
Blog Entries: 1
There is a sample in the Help File... (below)

objLoc is defined as an array of Locations, you would get the locations of your Pushpins into the array.


Sub AddPolylineToMap()

Dim objApp As New MapPoint.Application
Dim objMap As MapPoint.Map
Dim objLoc(1 To 3) As MapPoint.Location

'Set up the application
Set objMap = objApp.ActiveMap
objApp.Visible = True
objApp.UserControl = True

'Get three locations and zoom in
Set objLoc(1) = objMap.FindResults("Seattle, WA").Item(1)
Set objLoc(2) = objMap.FindResults("Redmond, WA").Item(1)
Set objLoc(3) = objMap.FindResults("Tacoma, WA").Item(1)
Set objMap.Location = objLoc(1)

'Create a polyline by connecting these locations
objMap.Shapes.AddPolyline objLoc

End Sub
__________________
~ Now taking orders for MapPoint 2009 ~
~
~ Upgrade to MapForums Plus membership ~
Reply With Quote