summaryrefslogtreecommitdiff
path: root/platform/ios/src/MGLMapView+Impl.mm
diff options
context:
space:
mode:
authorm-stephen <truestyle2005@163.com>2019-09-20 10:14:44 +0800
committerGitHub <noreply@github.com>2019-09-20 10:14:44 +0800
commit8128d709b62189e0745ea64be3d35e8c6dab59fa (patch)
tree0cc8d278b0a1f7ca626f5a0e67a4287d4da18ab5 /platform/ios/src/MGLMapView+Impl.mm
parentda6a7e9318e911ab03cacde781235b50326770ec (diff)
downloadqtlocation-mapboxgl-8128d709b62189e0745ea64be3d35e8c6dab59fa.tar.gz
[ios]Add errors reporting (#15391)
* add errors reporting * [ios] report error if rendering takes > 1 second. (#15633)
Diffstat (limited to 'platform/ios/src/MGLMapView+Impl.mm')
-rw-r--r--platform/ios/src/MGLMapView+Impl.mm7
1 files changed, 7 insertions, 0 deletions
diff --git a/platform/ios/src/MGLMapView+Impl.mm b/platform/ios/src/MGLMapView+Impl.mm
index 9cdab4dc63..0b9ab75699 100644
--- a/platform/ios/src/MGLMapView+Impl.mm
+++ b/platform/ios/src/MGLMapView+Impl.mm
@@ -3,6 +3,10 @@
#import "MGLStyle_Private.h"
#import "NSBundle+MGLAdditions.h"
+#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
+#import "MMEEventsManager.h"
+#endif
+
std::unique_ptr<MGLMapViewImpl> MGLMapViewImpl::Create(MGLMapView* nativeView) {
return std::make_unique<MGLMapViewOpenGLImpl>(nativeView);
}
@@ -61,6 +65,9 @@ void MGLMapViewImpl::onDidFailLoadingMap(mbgl::MapLoadError mapError, const std:
NSLocalizedFailureReasonErrorKey: @(what.c_str()),
};
NSError *error = [NSError errorWithDomain:MGLErrorDomain code:code userInfo:userInfo];
+#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
+ [[MMEEventsManager sharedManager] reportError:error];
+#endif
[mapView mapViewDidFailLoadingMapWithError:error];
}