Skip to content

Commit

Permalink
increase max zoom from 20.5 to 25
Browse files Browse the repository at this point in the history
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 tangrams#2264
  • Loading branch information
WebFreak001 committed Oct 12, 2023
1 parent 076b273 commit 54e4f90
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions core/include/tangram/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion core/src/view/view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion core/src/view/view.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit 54e4f90

Please sign in to comment.