summaryrefslogtreecommitdiff
path: root/platform/ios/src/MGLMapView.h
diff options
context:
space:
mode:
authorBobby Sudekum <bobby@mapbox.com>2018-07-02 16:30:18 -0700
committerGitHub <noreply@github.com>2018-07-02 16:30:18 -0700
commit4286d5869c9af0513298b8b31d36744a3243bff4 (patch)
tree8db8172a0bc9320fb79d9060bddede7cca7ee1b3 /platform/ios/src/MGLMapView.h
parent29e25356e355d466a60297117f3e7c010825a7ff (diff)
downloadqtlocation-mapboxgl-4286d5869c9af0513298b8b31d36744a3243bff4.tar.gz
Add pitch argument to cameraThatFits functions (#12213)
Diffstat (limited to 'platform/ios/src/MGLMapView.h')
-rw-r--r--platform/ios/src/MGLMapView.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h
index fd0ca19b26..04a7a06313 100644
--- a/platform/ios/src/MGLMapView.h
+++ b/platform/ios/src/MGLMapView.h
@@ -927,6 +927,37 @@ MGL_EXPORT IB_DESIGNABLE
- (MGLMapCamera *)cameraThatFitsCoordinateBounds:(MGLCoordinateBounds)bounds edgePadding:(UIEdgeInsets)insets;
/**
+ Returns the camera that best fits the given coordinate bounds, with the specified camera,
+ optionally with some additional padding on each side.
+
+ @param camera The camera that the return camera should adhere to. All values
+ on this camera will be manipulated except for pitch and direction.
+ @param bounds The coordinate bounds to fit to the receiver’s viewport.
+ @param insets The minimum padding (in screen points) that would be visible
+ around the returned camera object if it were set as the receiver’s camera.
+ @return A camera object centered on the same location as the coordinate bounds
+ with zoom level as high (close to the ground) as possible while still
+ including the entire coordinate bounds. The initial camera's pitch and
+ direction will be honored.
+ */
+- (MGLMapCamera *)camera:(MGLMapCamera *)camera fittingCoordinateBounds:(MGLCoordinateBounds)bounds edgePadding:(UIEdgeInsets)insets;
+
+/**
+ Returns the camera that best fits the given shape, with the specified camera,
+ optionally with some additional padding on each side.
+
+ @param camera The camera that the return camera should adhere to. All values
+ on this camera will be manipulated except for pitch and direction.
+ @param shape The shape to fit to the receiver’s viewport.
+ @param insets The minimum padding (in screen points) that would be visible
+ around the returned camera object if it were set as the receiver’s camera.
+ @return A camera object centered on the shape's center with zoom level as high
+ (close to the ground) as possible while still including the entire shape. The
+ initial camera's pitch and direction will be honored.
+ */
+- (MGLMapCamera *)camera:(MGLMapCamera *)camera fittingShape:(MGLShape *)shape edgePadding:(UIEdgeInsets)insets;
+
+/**
Returns the camera that best fits the given shape, with the specified direction,
optionally with some additional padding on each side.