diff options
author | Aleksandar Stojiljkovic <aleksandar.stojiljkovic@mapbox.com> | 2019-08-02 12:13:46 +0300 |
---|---|---|
committer | Aleksandar Stojiljkovic <aleksandar.stojiljkovic@mapbox.com> | 2019-08-08 12:14:48 +0300 |
commit | 8cf5103452fe5ce42f8c3ca4428243b8d5a9025a (patch) | |
tree | 0f98bbb8f88979a6a307e714b22bce3208389e69 /src/mbgl/map/transform.hpp | |
parent | 9ed6a84df6955a497830bd9d99f42e32422afb70 (diff) | |
download | qtlocation-mapboxgl-8cf5103452fe5ce42f8c3ca4428243b8d5a9025a.tar.gz |
[core] Reuse flyTo constant screen velocity calculation for easeTo implementation.
When using flyTo for easeTo:
Limit zoom out to min(startZoom, targetZoom).
Reduce cinematic zoom in animation at the end of transition,
Linear zoom interpolation.
The patch also sets linear interpolation for flyTo edgeInsets animation, as it looks more appropriate to follow the approach taken for pitch and bearing.
Fixes: #15144
Diffstat (limited to 'src/mbgl/map/transform.hpp')
-rw-r--r-- | src/mbgl/map/transform.hpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mbgl/map/transform.hpp b/src/mbgl/map/transform.hpp index 75dfeff645..ffeff3859c 100644 --- a/src/mbgl/map/transform.hpp +++ b/src/mbgl/map/transform.hpp @@ -34,12 +34,16 @@ public: /** Instantaneously, synchronously applies the given camera options. */ void jumpTo(const CameraOptions&); /** Asynchronously transitions all specified camera options linearly along - an optional time curve. */ + an optional time curve. However, center coordinate is not transitioned + linearly as, instead, ground speed is kept linear.*/ void easeTo(const CameraOptions&, const AnimationOptions& = {}); /** Asynchronously zooms out, pans, and zooms back into the given camera along a great circle, as though the viewer is riding a supersonic - jetcopter. */ - void flyTo(const CameraOptions&, const AnimationOptions& = {}); + jetcopter. + Parameter linearZoomInterpolation: when true, there is no additional + zooming out as zoom is linearly interpolated from current to given + camera zoom. This is used for easeTo.*/ + void flyTo(const CameraOptions&, const AnimationOptions& = {}, bool linearZoomInterpolation = false); // Position |