Exemplo n.º 1
0
        //public async Task<bool> StartGeolocator()
        //{
        //    var locator = CrossGeolocator.Current;
        //    locator.DesiredAccuracy = 1000;

        //    if (locator.IsGeolocationAvailable && locator.IsGeolocationEnabled)
        //    {
        //        locator.PositionChanged += OnPositionChanged;
        //        locator.PositionError += OnPositionError;
        //        return await locator.StartListeningAsync(100, 100);
        //    }
        //    else
        //    {
        //        return await Task.FromResult(false);
        //    }
        //}

        public Task <Address> GetAddressForPositionAsync(Position position)
        {
            return(platform.GetAddressForPositionAsync(position));
        }
Exemplo n.º 2
0
 public async Task <Address> GetAddressForPositionAsync(Position position)
 {
     return(await GetAddressForPositionAsync(position.Latitude, position.Longitude));
 }