您如何从 mapView 获取缩略图,如下图红色矩形框所示。
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];