xxxxxxxxxx
GetLastKnownLocationAsync();
GetLocationAsync();
GetLocationAsync(GeolocationRequest request);
GetLocationAsync(GeolocationRequest request, CancellationToken cancelToken);
We will use GetLocationAsync in this example. This function will coordinates using device GPS.
var location = await Geolocation.GetLocationAsync();
if (location != null)
{
double _log = location.Longitude;
double _lat = location. Latitude;
}
xxxxxxxxxx
//We will use GetLocationAsync in this example. This function will coordinates using device GPS.
var location = await Geolocation.GetLocationAsync();
if (location != null)
{
double _log = location.Longitude;
double _lat = location. Latitude;
}
xxxxxxxxxx
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
xxxxxxxxxx
GetLastKnownLocationAsync();
GetLocationAsync();
GetLocationAsync(GeolocationRequest request);
GetLocationAsync(GeolocationRequest request, CancellationToken cancelToken);