예제 #1
0
        public FirstPageViewModel(INavigationService navigationService, IGeoCoder geoCoder)
        {
            Address.Value = "東京都渋谷区";
            NextCommand   = Address.Select(x => !string.IsNullOrEmpty(x)).ToReactiveCommand();

            NextCommand.Subscribe(async _ =>
            {
                var res = await geoCoder.Forward(Address.Value);
                if (res != null)
                {
                    await navigationService.NavigateAsync($"SecondPage?lat={res.Latitude}&lng={res.Longitude}&title={res.DisplayName}");
                }
            });
        }