Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1") 'layout basic template
Wait For MapFragment1_Ready
gmap = MapFragment1.GetMap
rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result Then
Log(Tracker.gpslat)
Log(Tracker.gpslong)
gmap.MyLocationEnabled = True
gmap.TrafficEnabled=True
'gmap.MyLocation.Initialize(Tracker.gpslat,Tracker.gpslong)
Do While gmap.MyLocation.IsInitialized = False
Log("Location not initialized... Sleep a while...")
Sleep(250)
Loop
If gmap.MyLocation.IsInitialized Then
Dim CameraPosition1 As CameraPosition 'CameraPosition1.Initialize2(gmap.MyLocation.Latitude, gmap.MyLocation.Longitude, gmap.CameraPosition.Zoom, 0, 0)
gmap.MapType=gmap.MAP_TYPE_NORMAL
CameraPosition1.Initialize(gmap.MyLocation.Latitude,gmap.MyLocation.Longitude, 16)
gmap.AnimateCamera(CameraPosition1)
Sleep(2000)
CameraPosition1.Initialize(gmap.MyLocation.Latitude,gmap.MyLocation.Longitude, 18)
gmap.AnimateCamera(CameraPosition1)
For Each mrk As Map In markers.values <---- here I am getting error as "marker not defined"
Private mapmrk As Marker = gmap.AddMarker3(mrk.Get("latitude"),mrk.Get("longitude"),mrk.getdefault("name","Title"),LoadBitmapResize(File.DirAssets,mrk.getdefault("image","defaultimage.png"),30dip,30dip,True)) 'ignore
Next
End If
Else
Log("No permission!")
End If
End Sub