CAEAGLLayer *eaglLayer = (CAEAGLLayer *) self.mapView.layer; eaglLayer.drawableProperties = @{ kEAGLDrawablePropertyRetainedBacking: [NSNumber numberWithBool:YES], kEAGLDrawablePropertyColorFormat: kEAGLColorFormatRGBA8 };
//export image of mapView UIImage *screenshot = [[UIImage alloc] initWithData:[self getImage]]; //save image to photo album UIImageWriteToSavedPhotosAlbum(screenshot,self,@selector(image:didFinishSavingWithError:contextInfo:),nil);
I use the getImage method from bernese.
I use it in this manner://export image of mapView UIImage *screenshot = [[UIImage alloc] initWithData:[self getImage]]; //save image to photo album UIImageWriteToSavedPhotosAlbum(screenshot,self,@selector(image:didFinishSavingWithError:contextInfo:),nil);
Edit: I do not have any code similar to the DrawableProperty snippet you included.