Created
April 26, 2010 15:35
-
-
Save hramos/379480 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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