summaryrefslogtreecommitdiff
path: root/src/mbgl
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2017-02-11 02:06:20 -0500
committerJason Wray <friedbunny@users.noreply.github.com>2017-02-13 18:35:04 -0500
commit4c311a0091caea8246b36fb63cee4dbec3a62234 (patch)
tree8fe3648fef434614153d617de38c925e0f3e4417 /src/mbgl
parent3b53259c93c5c3891aa162aaf0329890a1a9d5e8 (diff)
downloadqtlocation-mapboxgl-4c311a0091caea8246b36fb63cee4dbec3a62234.tar.gz
[core] Expose Map::setZoom with anchor parameter
Diffstat (limited to 'src/mbgl')
-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) {