Skip to content

Instantly share code, notes, and snippets.

@hramos
Created April 26, 2010 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hramos/379480 to your computer and use it in GitHub Desktop.
Save hramos/379480 to your computer and use it in GitHub Desktop.
- (void)viewDidLoad {
[super viewDidLoad];
float scaleBy = 0.80;
id<MKAnnotation> annotation; // Define to yours
self.mapView = [[[MKMapView alloc] initWithFrame:CGRectMake(20.0f, 20.0f, 64 / scaleBy, 64 / scaleBy)] autorelease];
[self.mapView addAnnotation:job];
CLLocationCoordinate2D coordinate = annotation.coordinate;
coordinate.longitude -= 0.0006;
coordinate.latitude -= 0.0003;
[self.mapView setRegion:MKCoordinateRegionMake(coordinate, MKCoordinateSpanMake(.005, .005)) animated:YES];
self.mapView.scrollEnabled = NO;
self.mapView.zoomEnabled = NO;
self.mapView.delegate = self;
self.mapView.layer.transform = CATransform3DMakeScale(scaleBy, scaleBy, 1.0);
self.mapView.layer.cornerRadius = 8.0f;
self.mapView.layer.borderColor = [UIColor colorWithWhite:0.0f alpha:0.5f].CGColor;
self.mapView.layer.borderWidth = 1.0f / scaleBy;
// Use self.mapView for whatever you needed the thumbnail for
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment