public async Task<Domain.Models.Ui.Map.GeoPosition> GetPositionAsync(LocationAccuracy desiredAccuracy, TimeSpan maximumAge, TimeSpan timeout) { try { _geolocator.DesiredAccuracy = desiredAccuracy.ToPositionAccuracy(); var g = await _geolocator.GetGeopositionAsync(maximumAge, timeout); return g.FromGeoposition(); } catch (Exception ex) { throw ex; } }
public void Start(LocationAccuracy desiredAccuracy) { _geolocator.DesiredAccuracy = desiredAccuracy.ToPositionAccuracy(); _geolocator.StatusChanged += _geolocator_StatusChanged; _geolocator.PositionChanged += _geolocator_PositionChanged; #if WINDOWS_PHONE _geolocator.DesiredAccuracyInMeters = null; #endif }