summaryrefslogtreecommitdiff
path: root/platform/ios/src/MGLMapView.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/ios/src/MGLMapView.mm')
-rw-r--r--platform/ios/src/MGLMapView.mm14
1 files changed, 13 insertions, 1 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index c94cf477ef..ebb94ef6e5 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -76,6 +76,7 @@
#import "MGLMapAccessibilityElement.h"
#import "MGLLocationManager_Private.h"
#import "MGLLoggingConfiguration_Private.h"
+#import "MGLNetworkConfiguration_Private.h"
#include <algorithm>
#include <cstdlib>
@@ -197,7 +198,8 @@ public:
MGLSMCalloutViewDelegate,
MGLCalloutViewDelegate,
MGLMultiPointDelegate,
- MGLAnnotationImageDelegate>
+ MGLAnnotationImageDelegate,
+ MGLNetworkEventDelegate>
@property (nonatomic, readwrite) EAGLContext *context;
@property (nonatomic) GLKView *glView;
@@ -512,6 +514,9 @@ public:
// setup default location manager
self.locationManager = nil;
+
+ // setup the download events
+ [MGLNetworkConfiguration sharedManager].delegate = self;
// Set up annotation management and selection state.
_annotationImagesByIdentifier = [NSMutableDictionary dictionary];
@@ -6901,4 +6906,11 @@ private:
self.showsUserHeadingIndicator = showsHeading;
}
+#pragma mark - MGLNetworkEventDelegate
+
+- (void)networkConfiguration:(MGLNetworkConfiguration *)networkConfiguration didReceiveNetworkEvent:(NSDictionary *)event
+{
+ [MGLMapboxEvents pushEvent:kMGLDownloadPerformanceEvent withAttributes:event];
+}
+
@end