Beispiel #1
0
        void SetMapToCoordinate(CoreLocation.CLLocationCoordinate2D coordinate)
        {
            var currentSpan = new MapKit.MKCoordinateSpan(0.05, 0.05);
            var region      = new MapKit.MKCoordinateRegion(coordinate, currentSpan);

            MyMap.SetRegion(region, true);
        }
        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear (animated);

            var coords = new CoreLocation.CLLocationCoordinate2D (Latitude, Longitude);

            SetMapToCoordinate (coords);

            Title = PinTitle;
            var pin = new BasicPinAnnotation (coords, PinTitle, PinSubtitle);
            MyMap.AddAnnotation (pin);
        }
Beispiel #3
0
        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);

            var coords = new CoreLocation.CLLocationCoordinate2D(Latitude, Longitude);

            SetMapToCoordinate(coords);

            Title = PinTitle;
            var pin = new BasicPinAnnotation(coords, PinTitle, PinSubtitle);

            MyMap.AddAnnotation(pin);
        }
Beispiel #4
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            var coordinate = new CoreLocation.CLLocationCoordinate2D(Double.Parse(centroSelected.Latitud), Double.Parse(centroSelected.Longitud));
            var region     = new MapKit.MKCoordinateRegion(coordinate, new MapKit.MKCoordinateSpan(0, 0));

            centroMapView.SetRegion(region, true);
            centroMapView.AddAnnotations(new MKPointAnnotation()
            {
                Title      = centroSelected.Nombre,
                Coordinate = new CLLocationCoordinate2D(Double.Parse(centroSelected.Latitud), Double.Parse(centroSelected.Longitud)),
            });

            mapCentroActionButton.Clicked += MapCentroActionItem_Clicked;
        }