File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -257,7 +257,18 @@ -(void)updateCameraPosition: (NSString*)action command:(CDVInvokedUrlCommand *)c
257257
258258
259259- (void )toDataURL : (CDVInvokedUrlCommand *)command {
260- UIGraphicsBeginImageContext (self.mapCtrl .view .frame .size );
260+
261+ NSDictionary *opts = [command.arguments objectAtIndex: 1 ];
262+ BOOL uncompress = NO ;
263+ if ([opts objectForKey: @" uncompress" ]) {
264+ uncompress = [[opts objectForKey: @" uncompress" ] boolValue ];
265+ }
266+
267+ if (uncompress) {
268+ UIGraphicsBeginImageContextWithOptions (self.mapCtrl .view .frame .size , NO , 0 .0f );
269+ } else {
270+ UIGraphicsBeginImageContext (self.mapCtrl .view .frame .size );
271+ }
261272 [self .mapCtrl.view drawViewHierarchyInRect: self .mapCtrl.map.layer.bounds afterScreenUpdates: NO ];
262273 UIImage *image = UIGraphicsGetImageFromCurrentImageContext ();
263274 UIGraphicsEndImageContext ();
You can’t perform that action at this time.
0 commit comments