예제 #1
0
        public override async Task Load()
        {
            CameraTarget = _locationManager.LastKnownLocation;
            await CameraLocationChanged(CameraTarget);

            CameraStartMoving.Subscribe(_ => IsSearching = true);

            CameraPositionChanged.SelectMany(l => _geocodingProvider.ReverseGeocodingFromLocation(l))
            .Subscribe(address =>
            {
                SearchText      = address.FormattedAddress;
                _currentAddress = address;
                IsSearching     = false;
            }, ex =>
            {
                Debug.Write(ex);
                IsSearching = false;
            });
        }
        public override Task Load()
        {
            CameraStartMoving.Subscribe(_ => IsSearching = true);

            CameraPositionChanged.SelectMany(l => _geocodingProvider.ReverseGeocodingFromLocation(l))
            .ObserveOn(_schedulerProvider.DefaultScheduler)
            .Subscribe(address =>
            {
                SearchText      = address.FormattedAddress;
                _currentAddress = address;
                IsSearching     = false;
            }, ex =>
            {
                Debug.WriteLine(ex);
                IsSearching = false;
            });

            return(base.Load());
        }