in GeolocationSample/windows/GeolocationModule/GeolocationModule.cs [33:48]
public async void GetCoordinatesWithCallback(Action<string> resolve, Action<string> reject)
{
try
{
Geolocator geolocator = new Geolocator();
var position = await geolocator.GetGeopositionAsync();
string result = $"Latitude: {position.Coordinate.Point.Position.Latitude} - Longitude: {position.Coordinate.Point.Position.Longitude}";
resolve(result);
}
catch (Exception e)
{
reject(e.Message);
}
}