Hi,
I am trying to use the Plugin.Geolocator to get the user's current location.
I used below code and it's launching the app with no errors but I am not getting any value for Latitude or Longitude... it's just blank and no error..
This problem is for both iOS simulator and Android Emulator.
protected async override void OnAppearing()
{
base.OnAppearing();
var locator = CrossGeolocator.Current;
locator.DesiredAccuracy = 50;
var position = await locator.GetPositionAsync();
LabelLatitude.Text = position.Latitude.ToString();
LabelLongitude.Text = position.Longitude.ToString();
}
How to fix this please..
Thanks,
Jassim