Class

MKMapSnapshotter.Snapshot

An image generated by a snapshotter object.

Declaration

class Snapshot : NSObject

Overview

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.

Topics

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.

Beta

Relationships

Inherits From

Conforms To

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software