summaryrefslogtreecommitdiff
path: root/include/mbgl/map
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-01-15 12:01:37 -0800
committerMinh Nguyễn <mxn@1ec5.org>2016-01-18 16:54:58 -0800
commitbf87eaa7b8aa049358559a96f290603e13ac736b (patch)
treec28e725d66d6cee549b72f5f3bb13fbd1f61c6ad /include/mbgl/map
parentc86646519a4887d47003d11061a6a82e7ff4241c (diff)
downloadqtlocation-mapboxgl-bf87eaa7b8aa049358559a96f290603e13ac736b.tar.gz
[core, osx] Added optional padding to convenience methods
Methods that offer a convenient way to jump or ease now accept an optional padding parameter. MGLMapView specifies the padding to ensure that keyboard-based zooming and rotation respects the toolbar.
Diffstat (limited to 'include/mbgl/map')
-rw-r--r--include/mbgl/map/map.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp
index 3852bb7b6f..feb457758e 100644
--- a/include/mbgl/map/map.hpp
+++ b/include/mbgl/map/map.hpp
@@ -102,15 +102,17 @@ public:
void setLatLng(const LatLng&, const EdgeInsets&, const Duration& = Duration::zero());
void setLatLng(const LatLng&, const Duration& = Duration::zero());
LatLng getLatLng(const EdgeInsets& = {}) const;
- void resetPosition();
+ void resetPosition(const EdgeInsets& = {});
// Scale
void scaleBy(double ds, const PrecisionPoint& = { NAN, NAN }, const Duration& = Duration::zero());
void setScale(double scale, const PrecisionPoint& = { NAN, NAN }, const Duration& = Duration::zero());
double getScale() const;
void setZoom(double zoom, const Duration& = Duration::zero());
+ void setZoom(double zoom, const EdgeInsets&, const Duration& = Duration::zero());
double getZoom() const;
void setLatLngZoom(const LatLng&, double zoom, const Duration& = Duration::zero());
+ void setLatLngZoom(const LatLng&, double zoom, const EdgeInsets&, const Duration& = Duration::zero());
CameraOptions cameraForLatLngBounds(const LatLngBounds&, const EdgeInsets&);
CameraOptions cameraForLatLngs(const std::vector<LatLng>&, const EdgeInsets&);
void resetZoom();
@@ -120,9 +122,11 @@ public:
// Rotation
void rotateBy(const PrecisionPoint& first, const PrecisionPoint& second, const Duration& = Duration::zero());
void setBearing(double degrees, const Duration& = Duration::zero());
- void setBearing(double degrees, const PrecisionPoint&);
+ void setBearing(double degrees, const PrecisionPoint&, const Duration& = Duration::zero());
+ void setBearing(double degrees, const EdgeInsets&, const Duration& = Duration::zero());
double getBearing() const;
void resetNorth(const Duration& = std::chrono::milliseconds(500));
+ void resetNorth(const EdgeInsets&, const Duration& = std::chrono::milliseconds(500));
// Pitch
void setPitch(double pitch, const Duration& = Duration::zero());