AnsweredAssumed Answered

How to save screenshot of AGSMapView

Question asked by humzarr on Feb 20, 2013
Latest reply on Aug 21, 2013 by yvonne-igis-com-tw-esridist

I am developing an iOS app using ArcGIS api and I wanted to put a feature of saving screenshot of the map. However using the normal rendering procedure results in a blank image. I am using the self.mapview.layers to access the layer before I save the current context as an image.  Below are some lines of code from my app which does the function of saving screenshots.

     UIGraphicsBeginImageContextWithOptions(self.mapview.frame.size,NO, 0.0);
[self.mapview.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *screenshot = UIGraphicsGetImageFromCurrentImageContext();

There is another thread here which marks this code as the final answer but in the latest api 10.1, this just results in a blank image which is quite confusing for me.

I would appreciate if some one can help me deal with this.

thanks and Regards
H Akhtar