Class

MKMapSnapshotter

A utility object for capturing map-based imagery.

Overview

Use an MKMapSnapshotter object when you want to capture the system-provided map content, including the map tiles and imagery. The snapshotter object always captures the best image possible, loading all of the available map tiles before capturing the image.

You configure a snapshotter object using an MKMapSnapshotter.Options object. The snapshot options specify the appearance of the map, including which portion of the map you want to capture.

Topics

Initializing a Snapshotter Object

init(options: MKMapSnapshotter.Options)

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

Generating a Snapshot

func start(completionHandler: MKMapSnapshotter.CompletionHandler)

Submits the request to create a snapshot and delivers the results to the specified block.

func start(with: DispatchQueue, completionHandler: MKMapSnapshotter.CompletionHandler)

Submits the request to create a snapshot and executes the resulting block on the specified queue.

func cancel()

Cancels the current request to create a snapshot.

var isLoading: Bool

A Boolean value indicating whether the snapshotter is currently generating an image.

Constants

typealias MKMapSnapshotter.CompletionHandler

A block that processes the results of a snapshot request.

Classes

class MKMapSnapshotter.Snapshot

An image generated by a snapshotter object.

class MKMapSnapshotter.Options

The options to use when capturing map-based imagery.

Relationships

Inherits From

Conforms To

See Also

Static Snapshots

class MKMapSnapshotter.Options

The options to use when capturing map-based imagery.

class MKMapSnapshotter.Snapshot

An image generated by a snapshotter object.