summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/map/map.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp
index 727fdf6d40..bd69ce50f4 100644
--- a/src/mbgl/map/map.cpp
+++ b/src/mbgl/map/map.cpp
@@ -537,7 +537,13 @@ double Map::getScale() const {
void Map::setZoom(double zoom, const Duration& duration) {
impl->cameraMutated = true;
- setZoom(zoom, {}, duration);
+ setZoom(zoom, optional<EdgeInsets> {}, duration);
+}
+
+void Map::setZoom(double zoom, optional<ScreenCoordinate> anchor, const Duration& duration) {
+ impl->cameraMutated = true;
+ impl->transform.setZoom(zoom, anchor, duration);
+ impl->onUpdate(Update::RecalculateStyle);
}
void Map::setZoom(double zoom, optional<EdgeInsets> padding, const Duration& duration) {