How could you get thumbnail from mapView as shown on in the red rectangle box the figure below.
UIView *thumbnailContainer=[[UIView alloc]initWithFrame:CGRectMake(10,10,64,64)];
thumbnailContainer.clipsToBounds=YES;
thumbnailContainer.layer.borderColor=[UIColor colorWithWhite:0 alpha:0.5].CGColor;
thumbnailContainer.layer.cornerRadius=3;
thumbnailContainer.layer.borderWidth=1;
Annotation *annotation1=[[Annotation alloc]init];
annotation1.coordinate = CLLocationCoordinate2DMake(29.7189214,-95.33916);
annotation1.title = @"University of Houston";
annotation1.subtitle = @"4800 Calhoun Rd,Houston";
MKMapView *mapView2=[[MKMapView alloc]initWithFrame:CGRectMake(0, 0, 150, 150)];
mapView2.userInteractionEnabled=NO;
mapView2.centerCoordinate=[annotation1 coordinate];
[mapView2 addAnnotation:annotation1];
//annPoint=[self.mapView convertCoordinate:annotation1.coordinate toPointToView:self.mapView];
MKCoordinateRegion region=MKCoordinateRegionMakeWithDistance(mapView2.centerCoordinate, 150, 150);
mapView2.region=region;
mapView2.transform=CGAffineTransformMakeScale(0.75, 0.75);
mapView2.layer.position=CGPointMake(thumbnailContainer.bounds.size.width/2,thumbnailContainer.bounds.size.height/2+10);
[thumbnailContainer addSubview:mapView2];
What about using a scaled down map view? I don’t think than creating a thumbnail image from the rendered layer of a map view would be a good solution, as it would require to load the map at the desired zoom first, and then, why not displaying directly this map instead of making an image out of it? 😀 This is the code I would use.
It looks like that: