iOS Developer Library

Developer

MKMapSnapshotOptions Class Reference

Options
Deployment Target:

On This Page
Language:

MKMapSnapshotOptions

The MKMapSnapshotOptions class specifies the options to use when capturing map-based imagery. After creating and configuring an instance of this class, you pass that instance to an MKMapSnapshotter object. The snapshotter uses the options you specify to determine the portion of the map to capture, the viewing angle to use for the camera, and the map appearance.

  • camera Property

    The camera to use when taking the map snapshot.

    Declaration

    @property (nonatomic, copy) MKMapCamera *camera

    Discussion

    Specify a camera object if you want to change the pitch, altitude, or heading information applied to the map.

  • region Property

    The map region that you want to capture.

    Declaration

    @property (nonatomic, assign) MKCoordinateRegion region;

    Discussion

    Use this property to specify the map using geographical coordinates. If you assign a value for this property, the value in the mapRect property is updated to match the corresponding region as closely as possible.

    The default value of this property is set to a region that encompasses the user’s country, as determined by the current locale information.

  • mapRect Property

    The map rect that you want to capture.

    Declaration

    @property (nonatomic, assign) MKMapRect rect

    Discussion

    Use this property to specify the map using map view points. If you assign a value for this property, the value in the region property is updated to match the corresponding map rect as closely as possible.

    The default value of this property is set to a map rect that encompasses the user’s country, as determined by the current locale information.

  • mapType Property

    The map’s visual style.

    Declaration

    @property (nonatomic, assign) MKMapType mapType;

    Discussion

    The default value of this property is MKMapTypeStandard.

  • A Boolean indicating whether the map displays point-of-interest information.

    Declaration

    @property (nonatomic) BOOL showsPointsOfInterest;

    Discussion

    When this property is set to YEStrue, the map displays icons and labels for restaurants, schools, and other relevant points of interest. The default value of this property is YEStrue.

  • A Boolean indicating whether the map displays extruded building information.

    Declaration

    @property (nonatomic) BOOL showsBuildings;

    Discussion

    When this property is set to YEStrue and the camera has a pitch angle greater than 0, the map extrudes buildings so that they appear to extend above the map plane, creating a 3D effect. The mapType property must be set to MKMapTypeStandard for extruded buildings to be displayed. The default value of this property is YEStrue.

  • size Property

    The size of the image that you want to create.

    Declaration

    @property (nonatomic, assign) CGSize size;

    Discussion

    The default value of this property is 256 by 256 points.

  • size Property

    The size of the image that you want to create.

    Declaration

    @property (nonatomic, assign) NSSize size;

    Discussion

    The default value of this property is 256 by 256 points.

  • scale Property

    The scale factor to use when creating the image.

    Declaration

    @property (nonatomic, assign) CGFloat scale;

    Discussion

    The value of this property is either 1.0 or 2.0, depending on whether the device has a standard or Retina display. Set the value to 1.0 if you want to display the resulting image on a standard resolution display. Set the value to 2.0 if you want to display the image on a Retina display or want to use the image for printing.

    This property is set to a default value that corresponds to the resolution of the current device’s display. You can change the value as needed to generate an image suitable for display on a different device.