You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
[core] [iOS] Completion handlers for animated methods
Added transition frame and finish functions to CameraOptions. Added Objective-C equivalents to the three main entry points to easeTo() in MGLMapView.
Fixes#1581.
Copy file name to clipboardexpand all lines: CHANGELOG.md
+1
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@ Known issues:
23
23
24
24
## iOS master
25
25
26
+
-`MGLMapView` methods that alter the viewport now accept optional completion handlers. ([#3090](https://github.com/mapbox/mapbox-gl-native/pull/3090))
26
27
- Fixed an issue preventing the compass from responding to taps after the compass is moved programmatically. ([#3117](https://github.com/mapbox/mapbox-gl-native/pull/3117))
Copy file name to clipboardexpand all lines: include/mbgl/ios/MGLMapView.h
+25
Original file line number
Diff line number
Diff line change
@@ -134,6 +134,14 @@ IB_DESIGNABLE
134
134
* @param animated Specify `YES` if you want the map view to animate scrolling, zooming, and rotating to the new location or `NO` if you want the map to display the new location immediately. */
/** Changes the center coordinate, zoom level, and direction of the map, calling a completion handler at the end of an optional animation.
138
+
* @param centerCoordinate The new center coordinate for the map.
139
+
* @param zoomLevel The new zoom level for the map.
140
+
* @param direction The new direction for the map, measured in degrees relative to true north.
141
+
* @param animated Specify `YES` if you want the map view to animate scrolling, zooming, and rotating to the new location or `NO` if you want the map to display the new location immediately.
142
+
* @param completion The block executed after the animation finishes. */
/** The coordinate bounds visible in the receiver’s viewport.
138
146
*
139
147
* Changing the value of this property updates the receiver immediately. If you want to animate the change, call `setVisibleCoordinateBounds:animated:` instead. */
@@ -157,6 +165,16 @@ IB_DESIGNABLE
157
165
* @param animated Specify `YES` to animate the change by smoothly scrolling and zooming or `NO` to immediately display the given bounds. */
/** Sets the visible region so that the map displays the specified annotations.
161
179
*
162
180
* Calling this method updates the value in the visibleCoordinateBounds property and potentially other properties to reflect the new map region.
@@ -193,6 +211,13 @@ IB_DESIGNABLE
193
211
* @param function A timing function used for the animation. Set this parameter to `nil` for a transition that matches most system animations. If the duration is `0`, this parameter is ignored. */
/** Moves the viewpoint to a different location with respect to the map with an optional transition duration and timing function.
215
+
* @param camera The new viewpoint.
216
+
* @param duration The amount of time, measured in seconds, that the transition animation should take. Specify `0` to jump to the new viewpoint instantaneously.
217
+
* @param function A timing function used for the animation. Set this parameter to `nil` for a transition that matches most system animations. If the duration is `0`, this parameter is ignored.
218
+
* @param completion The block to execute after the animation finishes. */
0 commit comments