summaryrefslogtreecommitdiff
path: root/include/mbgl/map/map.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/map/map.hpp')
-rw-r--r--include/mbgl/map/map.hpp38
1 files changed, 20 insertions, 18 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp
index c80420371d..95a82ebd74 100644
--- a/include/mbgl/map/map.hpp
+++ b/include/mbgl/map/map.hpp
@@ -9,6 +9,7 @@
#include <mbgl/util/size.hpp>
#include <mbgl/annotation/annotation.hpp>
#include <mbgl/style/transition_options.hpp>
+#include <mbgl/map/camera.hpp>
#include <cstdint>
#include <string>
@@ -86,22 +87,23 @@ public:
void flyTo(const CameraOptions&, const AnimationOptions&);
// Position
- void moveBy(const ScreenCoordinate&, const Duration& = Duration::zero());
- void setLatLng(const LatLng&, optional<ScreenCoordinate>, const Duration& = Duration::zero());
- void setLatLng(const LatLng&, optional<EdgeInsets>, const Duration& = Duration::zero());
- void setLatLng(const LatLng&, const Duration& = Duration::zero());
+ void moveBy(const ScreenCoordinate&, const AnimationOptions& = {});
+ void setLatLng(const LatLng&, optional<ScreenCoordinate>, const AnimationOptions& = {});
+ void setLatLng(const LatLng&, optional<EdgeInsets>, const AnimationOptions& = {});
+ void setLatLng(const LatLng&, const AnimationOptions& = {});
LatLng getLatLng(optional<EdgeInsets> = {}) const;
void resetPosition(optional<EdgeInsets> = {});
// Scale
- void scaleBy(double ds, optional<ScreenCoordinate> = {}, const Duration& = Duration::zero());
- void setScale(double scale, optional<ScreenCoordinate> = {}, const Duration& = Duration::zero());
+ void scaleBy(double ds, optional<ScreenCoordinate> = {}, const AnimationOptions& = {});
+ void setScale(double scale, optional<ScreenCoordinate> = {}, const AnimationOptions& = {});
double getScale() const;
- void setZoom(double zoom, const Duration& = Duration::zero());
- void setZoom(double zoom, optional<EdgeInsets>, const Duration& = Duration::zero());
+ void setZoom(double zoom, const AnimationOptions& = {});
+ void setZoom(double zoom, optional<ScreenCoordinate>, const AnimationOptions& = {});
+ void setZoom(double zoom, optional<EdgeInsets>, const AnimationOptions& = {});
double getZoom() const;
- void setLatLngZoom(const LatLng&, double zoom, const Duration& = Duration::zero());
- void setLatLngZoom(const LatLng&, double zoom, optional<EdgeInsets>, const Duration& = Duration::zero());
+ void setLatLngZoom(const LatLng&, double zoom, const AnimationOptions& = {});
+ void setLatLngZoom(const LatLng&, double zoom, optional<EdgeInsets>, const AnimationOptions& = {});
CameraOptions cameraForLatLngBounds(const LatLngBounds&, optional<EdgeInsets>) const;
CameraOptions cameraForLatLngs(const std::vector<LatLng>&, optional<EdgeInsets>) const;
void resetZoom();
@@ -111,17 +113,17 @@ public:
double getMaxZoom() const;
// Rotation
- void rotateBy(const ScreenCoordinate& first, const ScreenCoordinate& second, const Duration& = Duration::zero());
- void setBearing(double degrees, const Duration& = Duration::zero());
- void setBearing(double degrees, optional<ScreenCoordinate>, const Duration& = Duration::zero());
- void setBearing(double degrees, optional<EdgeInsets>, const Duration& = Duration::zero());
+ void rotateBy(const ScreenCoordinate& first, const ScreenCoordinate& second, const AnimationOptions& = {});
+ void setBearing(double degrees, const AnimationOptions& = {});
+ void setBearing(double degrees, optional<ScreenCoordinate>, const AnimationOptions& = {});
+ void setBearing(double degrees, optional<EdgeInsets>, const AnimationOptions& = {});
double getBearing() const;
- void resetNorth(const Duration& = Milliseconds(500));
- void resetNorth(optional<EdgeInsets>, const Duration& = Milliseconds(500));
+ void resetNorth(const AnimationOptions& = {{mbgl::Milliseconds(500)}});
+ void resetNorth(optional<EdgeInsets>, const AnimationOptions& = {{mbgl::Milliseconds(500)}});
// Pitch
- void setPitch(double pitch, const Duration& = Duration::zero());
- void setPitch(double pitch, optional<ScreenCoordinate>, const Duration& = Duration::zero());
+ void setPitch(double pitch, const AnimationOptions& = {});
+ void setPitch(double pitch, optional<ScreenCoordinate>, const AnimationOptions& = {});
double getPitch() const;
// North Orientation