MGLUserTrackingModeFollowWithCourse

Added course-tracking. However, rotation has to happen atomically without animation until #1834 is fixed.

Fixes #1605.
This commit is contained in:
Minh Nguyễn
2015-08-13 10:00:05 -07:00
parent 2f31687844
commit dfeb479011
6 changed files with 37 additions and 20 deletions

View File

@@ -486,7 +486,7 @@ IB_DESIGNABLE
/** Tells the delegate that the location of the user was updated.
*
* While the showsUserLocation property is set to `YES`, this method is called whenever a new location update is received by the map view. This method is also called if the map view’s user tracking mode is set to MGLUserTrackingModeFollowWithHeading and the heading changes.
* While the showsUserLocation property is set to `YES`, this method is called whenever a new location update is received by the map view. This method is also called if the map view’s user tracking mode is set to MGLUserTrackingModeFollowWithHeading and the heading changes, or if it is set to MGLUserTrackingModeFollowWithCourse and the course changes.
*
* This method is not called if the application is currently running in the background. If you want to receive location updates while running in the background, you must use the Core Location framework.
*

View File

@@ -21,7 +21,9 @@ typedef NS_ENUM(NSUInteger, MGLUserTrackingMode) {
/** The map follows the user location. */
MGLUserTrackingModeFollow,
/** The map follows the user location and rotates when the heading changes. */
MGLUserTrackingModeFollowWithHeading
MGLUserTrackingModeFollowWithHeading,
/** The map follows the user location and rotates when the course changes. */
MGLUserTrackingModeFollowWithCourse,
};
NS_ASSUME_NONNULL_END