MGLMapSnapshotOptions


@interface MGLMapSnapshotOptions : NSObject

The options to use when creating images with the MGLMapsnapshotter.

  • Creates a set of options with the minimum required information

    Declaration

    Objective-C

    - (nonnull instancetype)initWithStyleURL:(nonnull NSURL *)styleURL
                                      camera:(nonnull MGLMapCamera *)camera
                                        size:(CGSize)size;

    Swift

    init(styleURL: URL, camera: MGLMapCamera, size: CGSize)

    Parameters

    styleURL

    the style url to use

    camera

    the camera settings

    size

    the image size

  • The size of the output image. Minimum is 64x64

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGSize size;

    Swift

    var size: CGSize { get }
  • The scale of the output image. Defaults to the main screen scale. Minimum is 1.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGFloat scale;

    Swift

    var scale: CGFloat { get set }