From 54e4f90860ad2414dbca73b033a6c0377ed0daa2 Mon Sep 17 00:00:00 2001 From: WebFreak001 Date: Thu, 12 Oct 2023 10:34:32 +0200 Subject: [PATCH] increase max zoom from 20.5 to 25 25 in streetcomplete seems to be about 5m for one phone width, probably higher than what anyone will ever need, but the capability is there now if users actually want to do this. fix #2264 --- core/include/tangram/map.h | 4 ++-- core/src/view/view.cpp | 2 +- core/src/view/view.h | 2 +- .../src/main/java/com/mapzen/tangram/MapController.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/include/tangram/map.h b/core/include/tangram/map.h index 4c72aba41c..58009910dc 100644 --- a/core/include/tangram/map.h +++ b/core/include/tangram/map.h @@ -261,8 +261,8 @@ class Map { // Get the minimum zoom level for the view. float getMinZoom() const; - // Set the maximum zoom level for the view; values greater than 20.5 will be - // clamped to 20.5; values less than the current minimum zoom level will set + // Set the maximum zoom level for the view; values greater than 25.0 will be + // clamped to 25.0; values less than the current minimum zoom level will set // the minimum zoom to this value. void setMaxZoom(float _maxZoom); diff --git a/core/src/view/view.cpp b/core/src/view/view.cpp index 815250a75d..b3bd2f1a96 100644 --- a/core/src/view/view.cpp +++ b/core/src/view/view.cpp @@ -161,7 +161,7 @@ void View::setMinZoom(float minZoom) { void View::setMaxZoom(float maxZoom) { - m_maxZoom = std::min(maxZoom, 20.5f); + m_maxZoom = std::min(maxZoom, 25.0f); m_minZoom = std::min(maxZoom, m_minZoom); // Set the current zoom again to validate it. setZoom(m_zoom); diff --git a/core/src/view/view.h b/core/src/view/view.h index 039f175c22..1fae23a9f9 100644 --- a/core/src/view/view.h +++ b/core/src/view/view.h @@ -96,7 +96,7 @@ class View { // Get the minimum zoom level. float getMinZoom() const { return m_minZoom; } - // Set the maximum zoom level. Clamped to <= 20.5. + // Set the maximum zoom level. Clamped to <= 25.0. void setMaxZoom(float maxZoom); // Get the maximum zoom level. diff --git a/platforms/android/tangram/src/main/java/com/mapzen/tangram/MapController.java b/platforms/android/tangram/src/main/java/com/mapzen/tangram/MapController.java index 48de84606c..b0712698a6 100644 --- a/platforms/android/tangram/src/main/java/com/mapzen/tangram/MapController.java +++ b/platforms/android/tangram/src/main/java/com/mapzen/tangram/MapController.java @@ -604,7 +604,7 @@ public float getMaximumZoomLevel() { /** * Set the maximum zoom level of the map view. * - * Values greater than the default maximum zoom will be clamped. Assigning a value less than the + * Values greater than 25.0 will be clamped. Assigning a value less than the * current minimum zoom will set the minimum zoom to this value. * @param maximumZoom The zoom level */