#1033 - Initial location of map.load event

This commit is contained in:
Brad Leege
2015-03-23 11:48:53 -05:00
parent de0aaff1f0
commit 11eebc498f

View File

@@ -387,6 +387,14 @@ mbgl::DefaultFileSource *mbglFileSource = nullptr;
_regionChangeDelegateQueue = [NSOperationQueue new];
_regionChangeDelegateQueue.maxConcurrentOperationCount = 1;
// Fire map.load
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];
return YES;
}