summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Leege <bleege@gmail.com>2015-03-25 20:42:50 -0500
committerBrad Leege <bleege@gmail.com>2015-03-25 20:42:50 -0500
commitdc838a9fc656e4f2d8234d2a1b8fa18319ccdfe7 (patch)
tree14607182615ec2f6435df5214bfd60b839dc7bcf
parent4408f4260b8beb60b138e13ca548dd87a7191458 (diff)
downloadqtlocation-mapboxgl-dc838a9fc656e4f2d8234d2a1b8fa18319ccdfe7.tar.gz
#1109 - Changing priority queue for map.load event. Fixing pushEvent call misplacement.
-rw-r--r--platform/ios/MGLMapView.mm6
1 files changed, 3 insertions, 3 deletions
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;