summaryrefslogtreecommitdiff
path: root/src/mbgl/map/map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/map/map.cpp')
-rw-r--r--src/mbgl/map/map.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp
index 7c19375542..25c4b5398d 100644
--- a/src/mbgl/map/map.cpp
+++ b/src/mbgl/map/map.cpp
@@ -187,6 +187,11 @@ void Map::resetPosition(const EdgeInsets& padding) {
#pragma mark - Zoom
+void Map::scaleBy(double scale, optional<ScreenCoordinate> anchor, const AnimationOptions& animation) {
+ double zoom = getZoom() + impl->transform.getState().scaleZoom(scale);
+ easeTo(CameraOptions().withZoom(zoom).withAnchor(anchor), animation);
+}
+
void Map::setZoom(double zoom, const AnimationOptions& animation) {
easeTo(CameraOptions().withZoom(zoom), animation);
}