diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-01-26 16:01:41 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-01-26 18:48:56 -0800 |
commit | 97fc2120c43ed53d3baa4a55f7fe1bb72e36427d (patch) | |
tree | 6902269f72ec9f58f10083a1900248be0df1ba59 /platform/ios/src/MGLUserLocationAnnotationView.m | |
parent | 14c052f5ce59795105640c0844cb07c69cb5175c (diff) | |
download | qtlocation-mapboxgl-97fc2120c43ed53d3baa4a55f7fe1bb72e36427d.tar.gz |
[ios] Fixed entering tracking mode at launch
Entering user tracking mode at launch now zooms in and shows the user dot or user puck. The user dot’s heading indicator now points in the correct direction during the animation to the initial location. Course changes are reflected immediately even in the absence of location changes.
Fixes #1145.
Diffstat (limited to 'platform/ios/src/MGLUserLocationAnnotationView.m')
-rw-r--r-- | platform/ios/src/MGLUserLocationAnnotationView.m | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/platform/ios/src/MGLUserLocationAnnotationView.m b/platform/ios/src/MGLUserLocationAnnotationView.m index 9adbd45f24..b59f4586b3 100644 --- a/platform/ios/src/MGLUserLocationAnnotationView.m +++ b/platform/ios/src/MGLUserLocationAnnotationView.m @@ -267,6 +267,10 @@ const CGFloat MGLUserLocationAnnotationArrowSize = MGLUserLocationAnnotationPuck _oldHeadingAccuracy = self.annotation.heading.headingAccuracy; } + if (self.annotation.heading.trueHeading >= 0) + { + _headingIndicatorLayer.affineTransform = CGAffineTransformRotate(CGAffineTransformIdentity, -MGLRadiansFromDegrees(self.mapView.direction - self.annotation.heading.trueHeading)); + } } else { |