Sub Globals
' create a new Map object (a Map not a GoogleMap!)
Dim Markers As Map
End Sub
Sub Map_Ready
Dim LatLngBoundsBuilder1 As LatLngBoundsBuilder
LatLngBoundsBuilder1.Initialize
gmap = mFragment.GetMap
If gmap.IsInitialized = False Then
ToastMessageShow("Error initializing map.", True)
Else
Markers.Initialize
Dim i As Int
For i = 0 To listaweb.Size - 1
Dim Marker1 As Marker
'Dim MarkerE As MarkerExtras
'Dim MarkerO As MarkerOptions
Dim P As Ptype
P = listaweb.Get(i)
Marker1=gmap.AddMarker3(P.latit, P.longi, P.nome, ico)
LatLngBoundsBuilder1.Include(Marker1.Position)
Marker1.Draggable=True
Markers.Put("marker_"&i, Marker1)
Next
Dim cp As CameraPosition
cp.Initialize(Main.LatGPS, Main.LonGPS, 15)
gmap.MoveCamera(cp)
End If
Dim MarkerBounds As LatLngBounds=LatLngBoundsBuilder1.Build
gmapEX.AnimateToBounds2(gmap, MarkerBounds, 70%x-1dip, 90%y, 128)
End Sub
Sub MyButton_Click
Dim MarkerId As String="marker_0"
Dim Marker1 As Marker=Markers.Get(MarkerId)
Marker1.InfoWindowShown=True
End Sub