summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Leege <bleege@gmail.com>2015-04-09 18:08:15 -0500
committerBrad Leege <bleege@gmail.com>2015-04-09 18:08:15 -0500
commit19e4bc7541afe6d1eee6c60de5bac8b914c0a1aa (patch)
tree7625adb0709ecc06f1723092f36b85f6d6965826
parenta22c2dd0a1aa14673bf3da5beb774f8218e36b4c (diff)
downloadqtlocation-mapboxgl-19e4bc7541afe6d1eee6c60de5bac8b914c0a1aa.tar.gz
#1247 - Adding Altitude and Vertical Accuracy attributes to location events
-rw-r--r--include/mbgl/ios/MGLMapboxEvents.h2
-rw-r--r--platform/ios/MGLMapboxEvents.m2
-rw-r--r--platform/ios/MGLMetricsLocationManager.m4
3 files changed, 7 insertions, 1 deletions
diff --git a/include/mbgl/ios/MGLMapboxEvents.h b/include/mbgl/ios/MGLMapboxEvents.h
index 2af3d8b168..b10d79e114 100644
--- a/include/mbgl/ios/MGLMapboxEvents.h
+++ b/include/mbgl/ios/MGLMapboxEvents.h
@@ -10,6 +10,8 @@ extern NSString *const MGLEventKeyLongitude;
extern NSString *const MGLEventKeyZoomLevel;
extern NSString *const MGLEventKeySpeed;
extern NSString *const MGLEventKeyCourse;
+extern NSString *const MGLEventKeyAltitude;
+extern NSString *const MGLEventKeyVerticalAccuracy;
extern NSString *const MGLEventKeyPushEnabled;
extern NSString *const MGLEventKeyEmailEnabled;
extern NSString *const MGLEventKeyGestureID;
diff --git a/platform/ios/MGLMapboxEvents.m b/platform/ios/MGLMapboxEvents.m
index 346bd70aca..90822e6832 100644
--- a/platform/ios/MGLMapboxEvents.m
+++ b/platform/ios/MGLMapboxEvents.m
@@ -23,6 +23,8 @@ NSString *const MGLEventKeyLongitude = @"lng";
NSString *const MGLEventKeyZoomLevel = @"zoom";
NSString *const MGLEventKeySpeed = @"speed";
NSString *const MGLEventKeyCourse = @"course";
+NSString *const MGLEventKeyAltitude = @"altitude";
+NSString *const MGLEventKeyVerticalAccuracy = @"verticalAccuracy";
NSString *const MGLEventKeyPushEnabled = @"enabled.push";
NSString *const MGLEventKeyEmailEnabled = @"enabled.email";
NSString *const MGLEventKeyGestureID = @"gesture";
diff --git a/platform/ios/MGLMetricsLocationManager.m b/platform/ios/MGLMetricsLocationManager.m
index 406186bb2a..b8b52f38d7 100644
--- a/platform/ios/MGLMetricsLocationManager.m
+++ b/platform/ios/MGLMetricsLocationManager.m
@@ -45,7 +45,9 @@
MGLEventKeyLatitude: @(loc.coordinate.latitude),
MGLEventKeyLongitude: @(loc.coordinate.longitude),
MGLEventKeySpeed: @(loc.speed),
- MGLEventKeyCourse: @(loc.course)
+ MGLEventKeyCourse: @(loc.course),
+ MGLEventKeyAltitude: @(loc.altitude),
+ MGLEventKeyVerticalAccuracy: @(loc.verticalAccuracy)
}];
}
}