An image generated by a snapshotter object.


class Snapshot : NSObject


You do not create instances of this class directly. Instead, you use an MKMapSnapshotter object to capture the map contents asynchronously. An MKMapSnapshotter.Snapshot object contains the image generated by the snapshotter from the map contents.

Snapshot images do not include any custom overlays or annotations that your app added to the map view. If you want your annotations and overlays to appear on the final image, you must draw them yourself. To position those items correctly on the image, use the point(for:) method of this class to translate the overlay or annotation coordinate value to an appropriate location inside the image’s coordinate space.


Getting the Snapshot Image

var image: UIImage

The image of the map’s content.

var appearance: NSAppearance

The visual style that MapKit actually used when rendering the snapshot.

Getting Points on the Image

func point(for: CLLocationCoordinate2D) -> CGPoint

Converts the specified map coordinate to a point in the coordinate space of the image.

Getting Appearance Traits

var traitCollection: UITraitCollection

Traits used to create the snapshot.


Inherits From

Conforms To