diff options
Diffstat (limited to 'platform/darwin/src/MGLMapSnapshotter.mm')
-rw-r--r-- | platform/darwin/src/MGLMapSnapshotter.mm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/platform/darwin/src/MGLMapSnapshotter.mm b/platform/darwin/src/MGLMapSnapshotter.mm index 3a258d146a..85619a780b 100644 --- a/platform/darwin/src/MGLMapSnapshotter.mm +++ b/platform/darwin/src/MGLMapSnapshotter.mm @@ -252,12 +252,15 @@ const CGFloat MGLSnapshotterMinimumPixelSize = 64; NSString *description = @(mbgl::util::toString(mbglError).c_str()); NSDictionary *userInfo = @{NSLocalizedDescriptionKey: description}; NSError *error = [NSError errorWithDomain:MGLErrorDomain code:MGLErrorCodeSnapshotFailed userInfo:userInfo]; - +#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR + [[MMEEventsManager sharedManager] reportError:error]; +#endif // Dispatch to result queue dispatch_async(queue, ^{ strongSelf.completion(nil, error); strongSelf.completion = nil; }); + } else { #if TARGET_OS_IPHONE MGLImage *mglImage = [[MGLImage alloc] initWithMGLPremultipliedImage:std::move(image) scale:strongSelf.options.scale]; @@ -636,6 +639,9 @@ const CGFloat MGLSnapshotterMinimumPixelSize = 64; NSError *error = [NSError errorWithDomain:MGLErrorDomain code:errorCode userInfo:userInfo]; +#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR + [[MMEEventsManager sharedManager] reportError:error]; +#endif completion(NULL, error); }); } |