summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2015-12-20 04:11:14 -0800
committerMinh Nguyễn <mxn@1ec5.org>2015-12-20 04:11:14 -0800
commit49bfdd662ff37ac77cd702c2cef92d2de8874be9 (patch)
treef2a0b06a4cdfceefb0574958dc3a6069ab222b20 /include
parentb7223f249ddd714f344a00ce4da00dafb44cc7fb (diff)
downloadqtlocation-mapboxgl-49bfdd662ff37ac77cd702c2cef92d2de8874be9.tar.gz
[ios, osx] Optional peak altitude for flying
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/ios/MGLMapView.h10
-rw-r--r--include/mbgl/osx/MGLMapView.h19
2 files changed, 29 insertions, 0 deletions
diff --git a/include/mbgl/ios/MGLMapView.h b/include/mbgl/ios/MGLMapView.h
index 32d68aa2cd..e10932bd27 100644
--- a/include/mbgl/ios/MGLMapView.h
+++ b/include/mbgl/ios/MGLMapView.h
@@ -235,6 +235,16 @@ IB_DESIGNABLE
* @param completion The block to execute after the animation finishes. */
- (void)flyToCamera:(MGLMapCamera *)camera withDuration:(NSTimeInterval)duration completionHandler:(nullable void (^)(void))completion;
+/** Moves the viewpoint to a different location using a transition animation that evokes powered flight and an optional transition duration and peak altitude.
+*
+* The transition animation seamlessly incorporates zooming and panning to help the user find his or her bearings even after traversing a great distance.
+*
+* @param camera The new viewpoint.
+* @param duration The amount of time, measured in seconds, that the transition animation should take. Specify `0` to jump to the new viewpoint instantaneously. Specify a negative value to use the default duration, which is based on the length of the flight path.
+* @param peakAltitude The altitude, measured in meters, at the midpoint of the animation. The value of this parameter is ignored if it is negative or if the animation transition resulting from a similar call to `-setCamera:animated:` would have a midpoint at a higher altitude.
+* @param completion The block to execute after the animation finishes. */
+- (void)flyToCamera:(MGLMapCamera *)camera withDuration:(NSTimeInterval)duration peakAltitude:(CLLocationDistance)peakAltitude completionHandler:(nullable void (^)(void))completion;
+
#pragma mark - Converting Map Coordinates
/** @name Converting Map Coordinates */
diff --git a/include/mbgl/osx/MGLMapView.h b/include/mbgl/osx/MGLMapView.h
index 6f46825448..ae701de27a 100644
--- a/include/mbgl/osx/MGLMapView.h
+++ b/include/mbgl/osx/MGLMapView.h
@@ -274,6 +274,25 @@ IB_DESIGNABLE
@param completion The block to execute after the animation finishes. */
- (void)flyToCamera:(MGLMapCamera *)camera withDuration:(NSTimeInterval)duration completionHandler:(nullable void (^)(void))completion;
+/** Moves the viewpoint to a different location using a transition animation
+ that evokes powered flight and an optional transition duration and peak
+ altitude.
+
+ The transition animation seamlessly incorporates zooming and panning to help
+ the user find his or her bearings even after traversing a great distance.
+
+ @param camera The new viewpoint.
+ @param duration The amount of time, measured in seconds, that the transition
+ animation should take. Specify `0` to jump to the new viewpoint
+ instantaneously. Specify a negative value to use the default duration,
+ which is based on the length of the flight path.
+ @param peakAltitude The altitude, measured in meters, at the midpoint of the
+ animation. The value of this parameter is ignored if it is negative or
+ if the animation transition resulting from a similar call to
+ `-setCamera:animated:` would have a midpoint at a higher altitude.
+ @param completion The block to execute after the animation finishes. */
+- (void)flyToCamera:(MGLMapCamera *)camera withDuration:(NSTimeInterval)duration peakAltitude:(CLLocationDistance)peakAltitude completionHandler:(nullable void (^)(void))completion;
+
/** The geographic coordinate bounds visible in the receiver’s viewport.
Changing the value of this property updates the receiver immediately. If you