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 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.

Relationships

Inherits From

Conforms To

See Also

Static Snapshots

class MKMapSnapshotter

A utility object for capturing map-based imagery.