Skip to content

Instantly share code, notes, and snippets.

@Schrodingrrr
Schrodingrrr / CellMapFactory.h
Last active September 27, 2018 06:25
Map Image creation with MKMapSnapshotter
#import <Foundation/Foundation.h>
#import <MapKit/MapKit.h>
@interface CellMapFactory : NSObject <MKMapViewDelegate>
- (void) createCellMapForPlace:(NSDictionary*)locationDictionary inImageView:(UIImageView*)imageView;
@end
@kukat
kukat / MKMapView static map image.m
Created October 2, 2014 06:27
MKMapSnapshotter
- (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];
@frankus
frankus / UIImageView+MapSnapshot.h
Created March 31, 2014 23:28
MKMapSnapshot category on UIImageView
//
// UIImageView+MapSnapshot.h
// Awning
//
// Created by Frank Schmitt on 3/31/14.
//
#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>