Skip to content

Instantly share code, notes, and snippets.

- (void)setupMapSnapshot
{
CLLocationCoordinate2D coordinate = self.outlet.annotaion.coordinate;
MKMapSnapshotOptions* options = [MKMapSnapshotOptions new];
options.size = self.mapImageView.frame.size;
options.scale = [[UIScreen mainScreen] scale];
options.region = MKCoordinateRegionMakeWithDistance(coordinate, 2000.f, 2000.f);
MKMapSnapshotter* snapshotter = [[MKMapSnapshotter alloc] initWithOptions:options];