Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Mapfr")
Wait For MapFR_Ready
gmap = MapFR.GetMap
rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If MapFR.IsGooglePlayServicesAvailable = False Then
ToastMessageShow("Please install Google Play Services.", True)
End If
Try
If Result Then
gmap.GetUiSettings
gmap.MyLocationEnabled = True
m1 = gmap.AddMarker3(gmap.MyLocation.Latitude, gmap.MyLocation.Longitude, "", SetBitmapDensity(LoadBitmap(File.DirAssets, "car.png")))
Dim CameraPosition1 As CameraPosition
CameraPosition1.Initialize(m1.Position.Latitude, m1.Position.Longitude, 18)
CameraPosition1 = gmap.CameraPosition
gmap.AnimateCamera(CameraPosition1)
m1.Visible = True
Else
Log("No permission!")
End If
Catch
Log("ERROR" & LastException.Message)
End Try
End SUb