The options to use when capturing map-based imagery.


class Options : NSObject


After creating and configuring an instance of this class, you pass that instance to an MKMapSnapshotter object. The snapshotter uses the configuration options to determine which portion of the map to capture, the viewing angle to use for the camera, and the map's overall appearance.

In macOS 10.14 and later, you can apply a light or dark appearance to your map snapshots by modifying the appearance property of your snapshot options. Even if you specify a custom appearance, users can use the Maps app to force all maps to adopt a light appearance.


Configuring the Snapshot Region

var region: MKCoordinateRegion

The map region that you want to capture.

var mapRect: MKMapRect

The map rect that you want to capture.

var camera: MKMapCamera

The camera to use when taking the map snapshot.

Configuring the Map Data

var mapType: MKMapType

The map’s visual style.

var showsBuildings: Bool

A Boolean indicating whether the map displays extruded building information.

var showsPointsOfInterest: Bool

A Boolean indicating whether the map displays point-of-interest information.

var pointOfInterestFilter: MKPointOfInterestFilter?

The filter used to determine the points of interest shown in the snapshot.

Configuring the Image Output

var traitCollection: UITraitCollection

Traits that determine the appearance of the map snapshot.

var size: CGSize

The size of the image that you want to create.

var appearance: NSAppearance?

The visual style (light or dark) to apply to the map when rendering the snapshot image.

var scale: CGFloat

The scale factor to use when creating the image.


Inherits From

See Also

Creating a Snapshotter Object

init(options: MKMapSnapshotter.Options)

Initializes and returns a snapshotter object based on the specified options.