diff options
author | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2017-10-02 14:46:25 -0700 |
---|---|---|
committer | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2017-10-09 11:42:37 -0700 |
commit | 9e79659007131450cde7e6e1a361f8ba3321fe98 (patch) | |
tree | f005ac054b48eac6fc6d2d82c58e2d8abed87711 /platform/ios/src/MGLMapView.h | |
parent | 2366487275ce90022bac67d51205e3011bca6f0a (diff) | |
download | qtlocation-mapboxgl-9e79659007131450cde7e6e1a361f8ba3321fe98.tar.gz |
[android][ios][macOS] Implement bindings for `Map::cameraForGeometry`. On macOS, also added -[MGLMapView setCamera: withDuration: animationTimingFunction: edgePadding: completionHandler:] for parity with iOS
Diffstat (limited to 'platform/ios/src/MGLMapView.h')
-rw-r--r-- | platform/ios/src/MGLMapView.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h index a1347cc09c..843fb3d280 100644 --- a/platform/ios/src/MGLMapView.h +++ b/platform/ios/src/MGLMapView.h @@ -890,6 +890,20 @@ MGL_EXPORT IB_DESIGNABLE - (MGLMapCamera *)cameraThatFitsCoordinateBounds:(MGLCoordinateBounds)bounds edgePadding:(UIEdgeInsets)insets; /** + Returns the camera that best fits the given shape, with the specified direction, + optionally with some additional padding on each side. + + @param shape The shape to fit to the receiver’s viewport. + @param direction The direction of the viewport, measured in degrees clockwise from true north. + @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 + camera object uses the current pitch. + */ +- (MGLMapCamera *)cameraThatFitsShape:(MGLShape *)shape direction:(double)direction edgePadding:(UIEdgeInsets)insets; + +/** Returns the point in this view’s coordinate system on which to "anchor" in response to a user-initiated gesture. |