### Add PolyLine between Markers

This is an example of adding Markers and a PolyLine connecting all Markers.
Define the PolyLine
Private PLine As MapPolyline
Private gmap As GoogleMap
Create the Markers and the PolyLine
By using the Map Ready Event.
`Sub gmap_Ready
Dim Lat, Lon As Double
Dim Points As List
Points.Initialize
If PLine.IsInitialized Then PLine.Visible = False
For i = 1 To 5
'Define the position
Lat = 5 * i
Lon = 10 * i
'Add to a LatLng Object
Dim ll As LatLng
ll.Initialize(Lat, Lon)
'Add to the Points List
Points.Add(ll)
'Add a new marker
Dim m As Marker = gmap.AddMarker(Lat, Lon, "Marker #" & i)
'Add the marker to the map with the title and also to the list of markers
MarkerTitleMap.Put(m, "Marker #" & i)
MarkerList.Add(m)
Next
'Create a polyline
PLine = gmap.AddPolyline(Points, 5, fx.Colors.Blue)
PLine.Visible = True
End Sub`

Changed: , Category: Google Maps, File: T6C197M1442.htm, ID: 1442