summaryrefslogtreecommitdiff
path: root/platform/osx/include/MGLMapView.h
diff options
context:
space:
mode:
Diffstat (limited to 'platform/osx/include/MGLMapView.h')
-rw-r--r--platform/osx/include/MGLMapView.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/platform/osx/include/MGLMapView.h b/platform/osx/include/MGLMapView.h
index f6ba86fb05..a8fd24ab5b 100644
--- a/platform/osx/include/MGLMapView.h
+++ b/platform/osx/include/MGLMapView.h
@@ -325,6 +325,41 @@ IB_DESIGNABLE
and zooming or `NO` to immediately display the given bounds. */
- (void)setVisibleCoordinateBounds:(MGLCoordinateBounds)bounds animated:(BOOL)animated;
+/** Changes the receiver’s viewport to fit the given coordinate bounds and
+ optionally some additional padding on each side.
+
+ @param bounds The bounds that the viewport will show in its entirety.
+ @param insets The minimum padding (in screen points) that will be visible
+ around the given coordinate bounds.
+ @param animated Specify `YES` to animate the change by smoothly scrolling and
+ zooming or `NO` to immediately display the given bounds.
+ */
+- (void)setVisibleCoordinateBounds:(MGLCoordinateBounds)bounds edgePadding:(NSEdgeInsets)insets animated:(BOOL)animated;
+
+/** Returns the camera that best fits the given coordinate bounds.
+
+ @param bounds The coordinate bounds to fit to the receiver’s viewport.
+ @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 camera object uses the
+ current direction and pitch.
+ */
+- (MGLMapCamera *)cameraThatFitsCoordinateBounds:(MGLCoordinateBounds)bounds;
+
+/** Returns the camera that best fits the given coordinate bounds, optionally
+ with some additional padding on each side.
+
+ @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 camera object uses the
+ current direction and pitch.
+ */
+- (MGLMapCamera *)cameraThatFitsCoordinateBounds:(MGLCoordinateBounds)bounds edgePadding:(NSEdgeInsets)insets;
+
/** A Boolean value indicating whether the receiver automatically adjusts its
content insets.