From dc838a9fc656e4f2d8234d2a1b8fa18319ccdfe7 Mon Sep 17 00:00:00 2001 From: Brad Leege Date: Wed, 25 Mar 2015 20:42:50 -0500 Subject: #1109 - Changing priority queue for map.load event. Fixing pushEvent call misplacement. --- platform/ios/MGLMapView.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'platform') diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index 63f0fcdd16..c10bfb887d 100644 --- a/platform/ios/MGLMapView.mm +++ b/platform/ios/MGLMapView.mm @@ -389,14 +389,12 @@ mbgl::DefaultFileSource *mbglFileSource = nullptr; // Fire map.load on a background thread - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{ NSMutableDictionary *evt = [[NSMutableDictionary alloc] init]; [evt setValue:[[NSNumber alloc] initWithDouble:mbglMap->getLatLng().latitude] forKey:@"lat"]; [evt setValue:[[NSNumber alloc] initWithDouble:mbglMap->getLatLng().longitude] forKey:@"lng"]; [evt setValue:[[NSNumber alloc] initWithDouble:mbglMap->getZoom()] forKey:@"zoom"]; - [[MGLMapboxEvents sharedManager] pushEvent:@"map.load" withAttributes:evt]; - [evt setValue:[[NSNumber alloc] initWithBool:[[UIApplication sharedApplication] isRegisteredForRemoteNotifications]] forKey:@"enabled.push"]; NSString *email = @"Unknown"; @@ -407,6 +405,8 @@ mbgl::DefaultFileSource *mbglFileSource = nullptr; email = [NSString stringWithFormat:@"%i", sendMail]; } [evt setValue:email forKey:@"enabled.email"]; + + [[MGLMapboxEvents sharedManager] pushEvent:@"map.load" withAttributes:evt]; }); return YES; -- cgit v1.2.1