diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-01-08 22:18:55 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-01-14 00:39:12 -0800 |
commit | 27b308a23482660d705eb82457a21213bc12599e (patch) | |
tree | c59bee5ba7f56f2ce9532c07d14c8b3fe6323a0f /include | |
parent | 5119ce8155713e9f601b2a5dd6c6dc5aefcb93ed (diff) | |
download | qtlocation-mapboxgl-27b308a23482660d705eb82457a21213bc12599e.tar.gz |
[core] Separated AnimationOptions from CameraOptions
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/map/camera.hpp | 17 | ||||
-rw-r--r-- | include/mbgl/map/map.hpp | 5 |
2 files changed, 11 insertions, 11 deletions
diff --git a/include/mbgl/map/camera.hpp b/include/mbgl/map/camera.hpp index 73d7d5e7d2..87adc46910 100644 --- a/include/mbgl/map/camera.hpp +++ b/include/mbgl/map/camera.hpp @@ -11,13 +11,9 @@ namespace mbgl { -/** Various options for describing the viewpoint of a map, along with parameters - for transitioning to the viewpoint with animation. All fields are optional; - the default values of transition options depend on how this struct is used. - */ +/** Various options for describing the viewpoint of a map. All fields are + optional. */ struct CameraOptions { - // Viewpoint options - /** Coordinate at the center of the map. */ mapbox::util::optional<LatLng> center; @@ -32,9 +28,12 @@ struct CameraOptions { /** Pitch toward the horizon measured in radians, with 0 rad resulting in a two-dimensional map. */ mapbox::util::optional<double> pitch; - - // Transition options - +}; + +/** Various options for describing a transition between viewpoints with + animation. All fields are optional; the default values depend on how this + struct is used. */ +struct AnimationOptions { /** Time to animate to the viewpoint defined herein. */ mapbox::util::optional<Duration> duration; diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index 2be31b5db6..4a6b85b28f 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -28,6 +28,7 @@ class Transform; class PointAnnotation; class ShapeAnnotation; struct CameraOptions; +struct AnimationOptions; namespace util { template <class T> class Thread; @@ -99,8 +100,8 @@ public: // Camera void jumpTo(const CameraOptions&); - void easeTo(const CameraOptions&); - void flyTo(const CameraOptions&); + void easeTo(const CameraOptions&, const AnimationOptions&); + void flyTo(const CameraOptions&, const AnimationOptions&); // Position void moveBy(const PrecisionPoint&, const Duration& = Duration::zero()); |