Class

MKMapView.CameraBoundary

A boundary of an area within which the map's center must remain.

Declaration

class CameraBoundary : NSObject

Overview

The constraints of the camera boundary restrict the center point of your map.

Topics

Creating a Camera Boundary

init?(coder: NSCoder)

Create a camera boundary using the provided coder.

init?(coordinateRegion: MKCoordinateRegion)

Create a camera boundary using the provided coordinate region.

init?(mapRect: MKMapRect)

Create a camera boundary using the provided map rectangle.

Accessing the Boundary

var mapRect: MKMapRect

The map rectangle that describes the camera boundary.

var region: MKCoordinateRegion

The coordinate region that describes the camera boundary.

Relationships

Inherits From

See Also

Constraining the Map View

Optimizing Map Views with Filtering and Camera Constraints

Display a map that is relevant to the user by filtering points of interest and search results, and constraining the visible region.

func setCameraBoundary(MKMapView.CameraBoundary?, animated: Bool)

Set the camera boundary for the map view, specifying whether to use animation.

var cameraBoundary: MKMapView.CameraBoundary?

The boundary of the area within which this map view's center must remain.

func setCameraZoomRange(MKMapView.CameraZoomRange?, animated: Bool)

Set the camera zoom range for the map view, specifying whether to use animation.

var cameraZoomRange: MKMapView.CameraZoomRange!

The zoom range applied to this map view.

class MKMapView.CameraZoomRange

A range that determines the minimum and maximum distance of the camera to the center of the map.