Exemplo n.º 1
0
        public Search()
        {
            key                 = Constants.getAPIKey();
            searchData          = new RealEstateXamarin.Models.Search();
            searchData.Latitud  = 35.732005;
            searchData.Longitud = 139.7668856;
            searchData.PriceMin = 0;
            searchData.PriceMin = 0;
            searchData.Distance = 0; // all and just show the 5 km ones

            BindingContext = searchData;
            NavigationPage.SetHasNavigationBar(this, false);
            InitializeComponent();

            MyMap.MoveToRegion(MapSpan.FromCenterAndRadius(new Position(searchData.Latitud, searchData.Longitud), Distance.FromKilometers(1)));
            MyMap.IsShowingUser     = true;
            MyMap.HorizontalOptions = LayoutOptions.FillAndExpand;
            MyMap.HeightRequest     = 200;


            Position po1 = new Position(searchData.Latitud, searchData.Longitud);

            var pin = new Pin
            {
                Type     = PinType.Place,
                Position = po1,
                Label    = "Nishi-Nippori Station",
                Address  = "Japan, 〒116-0013 Tōkyō-to, Arakawa-ku, Nishinippori, 5 Chome−22, 5 丁目"
            };

            MyMap.Pins.Add(pin);

            PickerPrice.ItemsSource = Data.getPrices();
        }
Exemplo n.º 2
0
        private void OnPickerSelectedIndexChanged(object sender, EventArgs e)
        {
            Picker picker       = sender as Picker;
            var    selectedItem = picker.SelectedItem;

            searchData = Data.setPrices(true, searchData, selectedItem.ToString());
        }