summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2015-12-19 10:22:27 -0800
committerMinh Nguyễn <mxn@1ec5.org>2015-12-19 20:33:18 -0800
commit0a9b6a82e4189d23c565adb2bf598c1bd7a3c309 (patch)
treed3ae31bb6e68ee6198d268b86a23c5b977a67f30 /include
parent97c143a3388647e74a9f74a4994ab9d6aafe26a9 (diff)
downloadqtlocation-mapboxgl-0a9b6a82e4189d23c565adb2bf598c1bd7a3c309.tar.gz
[core] Reformulated flyTo options
The speed and curve fields in CameraOptions have been replaced with velocity and minZoom fields, which expressed in screen units. Scaling and easing make it difficult to derive options that are expressed in physical units.
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/map/camera.hpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/include/mbgl/map/camera.hpp b/include/mbgl/map/camera.hpp
index 626ccac353..73d7d5e7d2 100644
--- a/include/mbgl/map/camera.hpp
+++ b/include/mbgl/map/camera.hpp
@@ -38,15 +38,16 @@ struct CameraOptions {
/** Time to animate to the viewpoint defined herein. */
mapbox::util::optional<Duration> duration;
- /** Average velocity of a flyTo() transition, measured in distance units per
- second. */
- mapbox::util::optional<double> speed;
+ /** Average velocity of a flyTo() transition, measured in screenfuls per
+ second, assuming a linear timing curve.
+
+ A <i>screenful</i> is the visible span in pixels. It does not correspond
+ to a fixed physical distance but rather varies by zoom level. */
+ mapbox::util::optional<double> velocity;
- /** The relative amount of zooming that takes place along the flight path of
- a flyTo() transition. A high value maximizes zooming for an exaggerated
- animation, while a low value minimizes zooming for something closer to
- easeTo(). */
- mapbox::util::optional<double> curve;
+ /** Zero-based zoom level at the peak of the flyTo() transition’s flight
+ path. */
+ mapbox::util::optional<double> minZoom;
/** The easing timing curve of the transition. */
mapbox::util::optional<mbgl::util::UnitBezier> easing;