Problem: Pushpin -> Polyline

Michelin
02-25-2004, 09:30 AM
Hello Everyone,

i'm programming in VB6 and MP2002. I have a recordset with Pushpins. And now I want to make a Polyline over these Pins.
I found the "AddPolyline()". But can someone tell me the Code how to do this.

Sorry, my english is bad, I know.

But i need HELP,

Michelin

Eric Frost
02-26-2004, 12:31 PM
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

 
Web mp2kmag.com
mapforums.com