コード例 #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            MyMap.WeakDelegate = this;

            ButtonLoad.Hidden = true;
            ButtonSave.Hidden = true;

            viewModel = new CoffeesViewModel();

            viewModel.PropertyChanged          += ViewModel_PropertyChanged;
            viewModel.Places.CollectionChanged += Places_CollectionChanged;

            ButtonSearch.TouchUpInside += ButtonSearch_TouchUpInside;
            ButtonLoad.TouchUpInside   += ButtonLoad_TouchUpInside;
            ButtonSave.TouchUpInside   += ButtonSave_TouchUpInside;

            var coords = new CLLocationCoordinate2D(App.StartLat, App.StartLong);
            var span   = new MKCoordinateSpan(DistanceUtils.MilesToLatitudeDegrees(10),
                                              DistanceUtils.MilesToLongitudeDegrees(10, coords.Latitude));

            MyMap.Region = new MKCoordinateRegion(coords, span);
        }