Sub Process_Globals
Type PersonType ( _
Id As Int, _
Position AsLatLng, _
flgHaveNewCoords as Boolean, _
LastReceived As Long)
Dim PersonList as List
Dim MarkersMap asMap
End Sub
' To be called when you have updated positions for the persons in PersonList
' MarkersMap has to be initialized before, when you first create the markers, using the person as a key and the marker itself as the value
Sub UpdateExistingMarkers
For each person as personType in PersonList
if person.flgHaveNewCoords=True then
Dim m AsMarker = MarkersMap.Get(person)
Dim NewPosition AsLatLng
NewPosition.Initialize(person.Position.Latitude,person.Position.Longitude)
m.Position=NewPosition
person.flgHaveNewCoords=False
End If
Next
End Sub