Class

MKMapSnapshotter

A utility object for capturing map-based imagery.

Declaration

class MKMapSnapshotter : NSObject

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

Creating a Snapshotter Object

init(options: MKMapSnapshotter.Options)

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

class MKMapSnapshotter.Options

The options to use when capturing map-based imagery.

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.

typealias MKMapSnapshotter.CompletionHandler

A block that processes the results of a snapshot request.

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.

Classes

class MKMapSnapshotter.Snapshot

An image generated by a snapshotter object.

Relationships

Inherits From

Conforms To

See Also

Static Snapshots

class MKMapSnapshotter.Snapshot

An image generated by a snapshotter object.