Sub Activity_Create(FirstTime As Boolean)
MapPanel.Initialize("")
Activity.AddView(MapPanel, 0, 0, 100%x, 100%y)
If mFragment.IsGooglePlayServicesAvailable = False Then
ToastMessageShow("Google Play services not available.", True)
Else
mFragment.Initialize("Map", MapPanel)
End If
End Sub
Sub Map_Ready
Log("map ready")
gmap = mFragment.GetMap
If gmap.IsInitialized = False Then
ToastMessageShow("Error initializing map.", True)
Else
Dim MarkerOptions1 As MarkerOptions
MarkerOptions1.Initialize
Dim Marker1 As Marker
Dim Marker2 As Marker
Marker1= gmap.AddMarker( 64.47619, 18.3980,"pkt1") ',LoadBitmap(File.DirAssets, "icon1.png")) ' Ok so far
Marker1.Snippet= "pkt1"
MarkerOptions1.Position2(64.99619, 17.3980).Snippet("pkt2").Title("pkt2")
Marker2=GoogleMapsExtras1.AddMarker(gmap, MarkerOptions1)
Dim cp As CameraPosition
cp.Initialize(64, 18, gmap.CameraPosition.Zoom)
gmap.AnimateCamera(cp)
End If
End Sub
Sub Map_MarkerClick (SelectedMarker As Marker) As Boolean 'Return True to consume the click
Log(SelectedMarker.Snippet)
SelectedMarker.Snippet="new snippet"
Log(SelectedMarker.Snippet)
'Return True
End Sub