|
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 |