diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-06-28 14:23:39 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-06-28 20:59:56 +0300 |
commit | 433e54e636293eb3b6644c143866aa0d39198441 (patch) | |
tree | bb30e6d61d69880e4e3d723129f974ad00121750 /src/mbgl | |
parent | a35b268606b6becf218286036e4d1cfc22ddcaa3 (diff) | |
download | qtlocation-mapboxgl-433e54e636293eb3b6644c143866aa0d39198441.tar.gz |
[core] Clamp to scale boundaries in TransformState::setLatLngZoom
Diffstat (limited to 'src/mbgl')
-rw-r--r-- | src/mbgl/map/transform_state.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/map/transform_state.cpp b/src/mbgl/map/transform_state.cpp index bbf7e22b31..f052e30a6b 100644 --- a/src/mbgl/map/transform_state.cpp +++ b/src/mbgl/map/transform_state.cpp @@ -358,7 +358,7 @@ void TransformState::setLatLngZoom(const LatLng& latLng, double zoom) { constrained = bounds->constrain(latLng); } - double newScale = zoomScale(zoom); + double newScale = util::clamp(zoomScale(zoom), min_scale, max_scale); const double newWorldSize = newScale * util::tileSize; Bc = newWorldSize / util::DEGREES_MAX; Cc = newWorldSize / util::M2PI; |