Exemple #1
0
        void ZoomToSeattle()
        {
            var coords = new CLLocationCoordinate2D(47.6062, -122.3321);
            var span   = new MKCoordinateSpan(DistanceUtils.MilesToLatitudeDegrees(20),
                                              DistanceUtils.MilesToLongitudeDegrees(20, coords.Latitude));

            MyMap.Region = new MKCoordinateRegion(coords, span);
        }
Exemple #2
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);
        }