Instance Property

visibleMapRect

The area currently displayed by the map view.

Declaration

var visibleMapRect: MKMapRect { get set }

Discussion

This property represents the same basic information as the region property but specified as a map rectangle instead of a region.

Changing the value of this property updates the map view immediately. If you want to animate the change, use the setVisibleMapRect(_:animated:) method instead.

See Also

Manipulating the Visible Portion of the Map

var region: MKCoordinateRegion

The area currently displayed by the map view.

func setRegion(MKCoordinateRegion, animated: Bool)

Changes the currently visible region and optionally animates the change.

var centerCoordinate: CLLocationCoordinate2D

The map coordinate at the center of the map view.

func setCenter(CLLocationCoordinate2D, animated: Bool)

Changes the center coordinate of the map and optionally animates the change.

func showAnnotations([MKAnnotation], animated: Bool)

Sets the visible region so that the map displays the specified annotations.

func setVisibleMapRect(MKMapRect, animated: Bool)

Changes the currently visible portion of the map and optionally animates the change.

func setVisibleMapRect(MKMapRect, edgePadding: UIEdgeInsets, animated: Bool)

Changes the currently visible portion of the map, allowing you to specify additional space around the edges.