private void PrepareMap()
        {
            _locationManager = new CLLocationManager();
            _locationManager.RequestWhenInUseAuthorization();
            DeliveryMapView.ShowsUserLocation = true;
            var span  = new MKCoordinateSpan(0.15, 0.15);
            var coord = new CLLocationCoordinate2D(Delivery.DestinationLatitude, Delivery.DestinationLongitude);

            DeliveryMapView.Region = new MKCoordinateRegion(coord, span);
            DeliveryMapView.AddAnnotation(new MKPointAnnotation()
            {
                Coordinate = coord, Title = "Deliver here"
            });
        }
Example #2
0
        void ReleaseDesignerOutlets()
        {
            if (DeliverBarButtonItem != null)
            {
                DeliverBarButtonItem.Dispose();
                DeliverBarButtonItem = null;
            }

            if (DeliveryMapView != null)
            {
                DeliveryMapView.Dispose();
                DeliveryMapView = null;
            }

            if (navigateBarButtonItem != null)
            {
                navigateBarButtonItem.Dispose();
                navigateBarButtonItem = null;
            }
        }