summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/ios/src/MGLMapView.h4
-rw-r--r--platform/ios/src/MGLMapView.mm8
2 files changed, 9 insertions, 3 deletions
diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h
index 16a76ebcfe..33d1146943 100644
--- a/platform/ios/src/MGLMapView.h
+++ b/platform/ios/src/MGLMapView.h
@@ -362,8 +362,8 @@ MGL_EXPORT IB_DESIGNABLE
permanent heading indicator.
Setting this property to `YES` causes the default user location annotation to
- always show an arrow-shaped heading indicator, if heading is available. This
- property does not rotate the map; for that, see
+ appear and always show an arrow-shaped heading indicator, if heading is
+ available. This property does not rotate the map; for that, see
`MGLUserTrackingModeFollowWithHeading`.
This property has no effect when `userTrackingMode` is
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index e6d10f3479..7d47da694c 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -4416,6 +4416,12 @@ public:
- (void)setShowsUserHeadingIndicator:(BOOL)showsUserHeadingIndicator
{
_showsUserHeadingIndicator = showsUserHeadingIndicator;
+
+ if (_showsUserHeadingIndicator)
+ {
+ self.showsUserLocation = YES;
+ }
+
[self validateUserHeadingUpdating];
}
@@ -4423,7 +4429,7 @@ public:
{
BOOL canShowPermanentHeadingIndicator = self.showsUserHeadingIndicator && self.userTrackingMode != MGLUserTrackingModeFollowWithCourse;
- if (self.showsUserLocation && (canShowPermanentHeadingIndicator || self.userTrackingMode == MGLUserTrackingModeFollowWithHeading))
+ if (canShowPermanentHeadingIndicator || self.userTrackingMode == MGLUserTrackingModeFollowWithHeading)
{
[self updateHeadingForDeviceOrientation];
[self.locationManager startUpdatingHeading];