### Add Point to Marker Polyline

When having multiple Markers with Polylines, it is handy to use a Map holding the Markers to then add a Waypoint to a Marker Polyline.
The Map will hold the Marker as the Key and the Polyline as the Value.
Dim MarkerMap as Map
MarkerMap.Initialize
`Sub AddPointToMarker(mMarker As Marker, mLat As Double, mLon As Double)
'Check if the marker is in the map. If not, add the marker with the polyline
If MarkerMap.ContainsKey(mMarker) = False Then
Dim pline As MapPolyline = GoogleMap1.AddPolyline
MarkerMap.Put(mMarker, pline)
End If
'Get the polyline from the map
Dim pline As Polyline = MarkerMap.Get(mMarker)
'Create a new LatLng
Dim ll As LatLng
ll.Initialize(mLat, mLon)
'Create a list holding the polyline points
Dim points As List = pline.Points
'Add the new LatLng to the points list
points.Add(ll)
'Assign the points to the polyline
pline.Points = points
'Update the map
MarkerMap.Put(mMarker, pline)
End Sub`

Changed: , Category: Google Maps, File: T6C197M1441.htm, ID: 1441