summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Rex <julian.rex@mapbox.com>2019-05-02 00:19:07 -0400
committerJulian Rex <julian.rex@mapbox.com>2019-05-02 00:19:07 -0400
commitb87b7471ce5d17bda6ea34a8db7b1950a4b3c929 (patch)
tree7c37b9b7d4f141db674fbe0df124eabb67a13b27
parent3e4afbc788424ef4d89d48f4d29204d1593f769d (diff)
downloadqtlocation-mapboxgl-b87b7471ce5d17bda6ea34a8db7b1950a4b3c929.tar.gz
[ios] Revert nullable change to public API
-rw-r--r--platform/ios/src/MGLMapView.h8
-rw-r--r--platform/ios/src/MGLMapView.mm12
2 files changed, 10 insertions, 10 deletions
diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h
index 2423d62ee1..607a197840 100644
--- a/platform/ios/src/MGLMapView.h
+++ b/platform/ios/src/MGLMapView.h
@@ -1130,7 +1130,7 @@ MGL_EXPORT
`UIApplicationWillTerminateNotification`; you may receive a `nil` return value
depending on the order of notification delivery.
*/
-- (nullable MGLMapCamera *)cameraThatFitsCoordinateBounds:(MGLCoordinateBounds)bounds edgePadding:(UIEdgeInsets)insets;
+- (MGLMapCamera *)cameraThatFitsCoordinateBounds:(MGLCoordinateBounds)bounds edgePadding:(UIEdgeInsets)insets;
/**
Returns the camera that best fits the given coordinate bounds, with the specified camera,
@@ -1150,7 +1150,7 @@ MGL_EXPORT
`UIApplicationWillTerminateNotification`; you may receive a `nil` return value
depending on the order of notification delivery.
*/
-- (nullable MGLMapCamera *)camera:(MGLMapCamera *)camera fittingCoordinateBounds:(MGLCoordinateBounds)bounds edgePadding:(UIEdgeInsets)insets;
+- (MGLMapCamera *)camera:(MGLMapCamera *)camera fittingCoordinateBounds:(MGLCoordinateBounds)bounds edgePadding:(UIEdgeInsets)insets;
/**
Returns the camera that best fits the given shape, with the specified camera,
@@ -1169,7 +1169,7 @@ MGL_EXPORT
`UIApplicationWillTerminateNotification`; you may receive a `nil` return value
depending on the order of notification delivery.
*/
-- (nullable MGLMapCamera *)camera:(MGLMapCamera *)camera fittingShape:(MGLShape *)shape edgePadding:(UIEdgeInsets)insets;
+- (MGLMapCamera *)camera:(MGLMapCamera *)camera fittingShape:(MGLShape *)shape edgePadding:(UIEdgeInsets)insets;
/**
Returns the camera that best fits the given shape, with the specified direction,
@@ -1187,7 +1187,7 @@ MGL_EXPORT
`UIApplicationWillTerminateNotification`; you may receive a `nil` return value
depending on the order of notification delivery.
*/
-- (nullable MGLMapCamera *)cameraThatFitsShape:(MGLShape *)shape direction:(CLLocationDirection)direction edgePadding:(UIEdgeInsets)insets;
+- (MGLMapCamera *)cameraThatFitsShape:(MGLShape *)shape direction:(CLLocationDirection)direction edgePadding:(UIEdgeInsets)insets;
/**
Returns the point in this view’s coordinate system on which to "anchor" in
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index b5383ee30e..4e6b203aee 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -3873,9 +3873,9 @@ public:
{
if (!_mbglMap)
{
- return nil;
+ return self.residualCamera;
}
-
+
mbgl::EdgeInsets padding = MGLEdgeInsetsFromNSEdgeInsets(insets);
padding += MGLEdgeInsetsFromNSEdgeInsets(self.contentInset);
mbgl::CameraOptions cameraOptions = self.mbglMap.cameraForLatLngBounds(MGLLatLngBoundsFromCoordinateBounds(bounds), padding);
@@ -3886,7 +3886,7 @@ public:
{
if (!_mbglMap)
{
- return nil;
+ return self.residualCamera;
}
mbgl::EdgeInsets padding = MGLEdgeInsetsFromNSEdgeInsets(insets);
@@ -3903,7 +3903,7 @@ public:
- (MGLMapCamera *)camera:(MGLMapCamera *)camera fittingShape:(MGLShape *)shape edgePadding:(UIEdgeInsets)insets {
if (!_mbglMap)
{
- return nil;
+ return self.residualCamera;
}
mbgl::EdgeInsets padding = MGLEdgeInsetsFromNSEdgeInsets(insets);
@@ -3921,7 +3921,7 @@ public:
- (MGLMapCamera *)cameraThatFitsShape:(MGLShape *)shape direction:(CLLocationDirection)direction edgePadding:(UIEdgeInsets)insets {
if (!_mbglMap)
{
- return nil;
+ return self.residualCamera;
}
mbgl::EdgeInsets padding = MGLEdgeInsetsFromNSEdgeInsets(insets);
@@ -3936,7 +3936,7 @@ public:
{
if (!_mbglMap)
{
- return nil;
+ return self.residualCamera;
}
mbgl::CameraOptions mapCamera = self.mbglMap.getCameraOptions();