iOS Developer Library

Developer

MKMapSnapshot Class Reference

Options
Deployment Target:

On This Page
Language:

MKMapSnapshot

An MKMapSnapshot object contains an image generated by a snapshotter object. You do not create instances of this class directly. Instead, you use an MKMapSnapshotter object capture the map contents asynchronously. Upon completion, the snapshotter object generates an image based on the options you provide and delivers that image inside an instance of this class. More...

Inheritance


Conforms To


Import Statement


import MapKit @import MapKit;

Availability


Available in iOS 7.0 and later.
  • image image Property

    The image of the map’s content. (read-only)

    Declaration

    Swift

    var image: UIImage! { get }

    Objective-C

    @property(nonatomic, readonly) UIImage *image

    Import Statement

    import MapKit

    Availability

    Available in iOS 7.0 and later.

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

    Declaration

    Swift

    func pointForCoordinate(_ coordinate: CLLocationCoordinate2D) -> CGPoint

    Objective-C

    - (CGPoint)pointForCoordinate:(CLLocationCoordinate2D)coordinate

    Parameters

    coordinate

    A map coordinate that you want to convert.

    Return Value

    The point in the image’s coordinate space that corresponds to the map location.

    Discussion

    If you want to display additional views or content on top of the image, you can use this method to find an appropriate point at which to draw those items.

    Import Statement

    import MapKit

    Availability

    Available in iOS 7.0 and later.