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 style URL for these options.
Declaration
Objective-C
@property (readonly, nonatomic) NSURL *_Nonnull styleURL;
Swift
var styleURL: URL { get }
-
The zoom. Default is 0.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) double zoom;
Swift
var zoom: Double { get set }
-
The
MGLMapcamera
options to use.Declaration
Objective-C
@property (assign, readwrite, nonatomic) MGLMapCamera *_Nonnull camera;
Swift
var camera: MGLMapCamera { get set }
-
A region to capture. Overrides the center coordinate in the mapCamera options if set
Declaration
Objective-C
@property (assign, readwrite, nonatomic) MGLCoordinateBounds region;
Swift
var region: MGLCoordinateBounds { get set }
-
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 }