summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2018-10-03 19:50:49 -0400
committerJason Wray <friedbunny@users.noreply.github.com>2018-10-09 12:34:58 -0400
commit558cb9bba6aeea74db2e2372c4f345596469e423 (patch)
tree338ebfef7e8beb06f6d94040dd05e69550bfcc9b
parent7c9570ef8b2a800aa1fea07c2036e52daf1dced5 (diff)
downloadqtlocation-mapboxgl-558cb9bba6aeea74db2e2372c4f345596469e423.tar.gz
[ios] Ignore deprecation warnings for MGLMapView.userLocationVerticalAlignment
-rw-r--r--platform/ios/src/MGLMapView.mm13
1 files changed, 12 insertions, 1 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 8fdd393e48..e9fd568a04 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -5254,10 +5254,15 @@ public:
self.targetCoordinate,
};
UIEdgeInsets inset = self.edgePaddingForFollowingWithCourse;
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (self.userLocationVerticalAlignment == MGLAnnotationVerticalAlignmentCenter)
{
inset.bottom = CGRectGetMaxY(self.bounds) - CGRectGetMidY(self.contentFrame);
}
+#pragma clang diagnostic pop
+
[self _setVisibleCoordinates:foci
count:sizeof(foci) / sizeof(foci[0])
edgePadding:inset
@@ -5317,10 +5322,13 @@ public:
if (direction >= 0)
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (self.userLocationVerticalAlignment == MGLAnnotationVerticalAlignmentTop)
{
direction += 180;
}
+#pragma clang diagnostic pop
}
}
return direction;
@@ -6012,7 +6020,9 @@ public:
}
CGPoint center = CGPointMake(CGRectGetMidX(contentFrame), CGRectGetMidY(contentFrame));
-
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
switch (self.userLocationVerticalAlignment) {
case MGLAnnotationVerticalAlignmentCenter:
break;
@@ -6023,6 +6033,7 @@ public:
center.y = CGRectGetMaxY(contentFrame);
break;
}
+#pragma clang dianostic pop
return center;
}