Merge pull request #1196 from mapbox/1195-speed-course
Speed And Course Attributes
This commit is contained in:
@@ -8,6 +8,8 @@ extern NSString *const MGLEventTypeLocation;
|
||||
extern NSString *const MGLEventKeyLatitude;
|
||||
extern NSString *const MGLEventKeyLongitude;
|
||||
extern NSString *const MGLEventKeyZoomLevel;
|
||||
extern NSString *const MGLEventKeySpeed;
|
||||
extern NSString *const MGLEventKeyCourse;
|
||||
extern NSString *const MGLEventKeyPushEnabled;
|
||||
extern NSString *const MGLEventKeyEmailEnabled;
|
||||
extern NSString *const MGLEventKeyGestureID;
|
||||
|
||||
@@ -20,6 +20,8 @@ NSString *const MGLEventTypeLocation = @"location";
|
||||
NSString *const MGLEventKeyLatitude = @"lat";
|
||||
NSString *const MGLEventKeyLongitude = @"lng";
|
||||
NSString *const MGLEventKeyZoomLevel = @"zoom";
|
||||
NSString *const MGLEventKeySpeed = @"speed";
|
||||
NSString *const MGLEventKeyCourse = @"course";
|
||||
NSString *const MGLEventKeyPushEnabled = @"enabled.push";
|
||||
NSString *const MGLEventKeyEmailEnabled = @"enabled.email";
|
||||
NSString *const MGLEventKeyGestureID = @"gesture";
|
||||
|
||||
@@ -45,7 +45,9 @@
|
||||
for (CLLocation *loc in locations) {
|
||||
[MGLMapboxEvents pushEvent:MGLEventTypeLocation withAttributes:@{
|
||||
MGLEventKeyLatitude: @(loc.coordinate.latitude),
|
||||
MGLEventKeyLongitude: @(loc.coordinate.longitude)
|
||||
MGLEventKeyLongitude: @(loc.coordinate.longitude),
|
||||
MGLEventKeySpeed: @(loc.speed),
|
||||
MGLEventKeyCourse: @(loc.course)
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user