у меня есть решение этой проблемы
когда вы нажимаете кнопку информации, просто установите карту в центр. и взять изображение оттуда
что я сделал до сих пор
взял одно изображение mapImageview в .h и использовал это изображение для хранения изображения аннотации
сначала запомните координаты булавки, которую вы уронили
а затем просто отцентрировать эту область, вызвав функцию
-(void)setMaptocentre:(double)lat (double)long
{
MKCoordinateRegion region;
region.center.latitude=lat;
region.center.longitude=long;
MKCoordinateSpan span;
span.latitudeDelta=10;
span.longitudeDelta=10;
region.span =span;
[MapView setRegion:region animated:YES];
}
-(IBAction)infoPressed:(id)sender
{
[self setMaptocentre: rememberedLat rememberdLong];
//here the rememberedlat and rememberedLong are the latitude and longitude you have
// saved at the time of pin drop. the function brings the pin to centre of map
// and then does the following part to take the image, where it includes the pin
UIGraphicsBeginImageContext(CGRectMake(150, 200, 100, 100).size);
CGContextRef c = UIGraphicsGetCurrentContext();
CGContextTranslateCTM(c,-105, -130);
[self.view.layer renderInContext:c];
UIImage* viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
NSData *imageData = UIImagePNGRepresentation(viewImage);
mapImageview.image = [UIImage imageWithData:imageData];
}
я знаю, что вы получите ответ до сих пор, но ради других, я публикую здесь
спасибо