diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-06-01 00:58:03 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-06-01 17:04:09 +0300 |
commit | 99cfbacdfba642e042132660b0201db0984b6d22 (patch) | |
tree | 65a2606947ab083550f46db93d800a982829dbcf /src/mbgl/map/transform_state.hpp | |
parent | 893584517182c270b7238a2fddb616a8a0e657d6 (diff) | |
download | qtlocation-mapboxgl-99cfbacdfba642e042132660b0201db0984b6d22.tar.gz |
[core] Make TransformState LatLngBounds optional
Diffstat (limited to 'src/mbgl/map/transform_state.hpp')
-rw-r--r-- | src/mbgl/map/transform_state.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mbgl/map/transform_state.hpp b/src/mbgl/map/transform_state.hpp index d0bf455ead..e6464aeacc 100644 --- a/src/mbgl/map/transform_state.hpp +++ b/src/mbgl/map/transform_state.hpp @@ -4,6 +4,7 @@ #include <mbgl/util/geo.hpp> #include <mbgl/util/geometry.hpp> #include <mbgl/util/constants.hpp> +#include <mbgl/util/optional.hpp> #include <mbgl/util/projection.hpp> #include <mbgl/util/mat4.hpp> #include <mbgl/util/size.hpp> @@ -50,8 +51,8 @@ public: double getZoomFraction() const; // Bounds - void setLatLngBounds(const LatLngBounds&); - LatLngBounds getLatLngBounds() const; + void setLatLngBounds(optional<LatLngBounds>); + optional<LatLngBounds> getLatLngBounds() const; void setMinZoom(double); double getMinZoom() const; void setMaxZoom(double); @@ -89,7 +90,7 @@ private: bool rotatedNorth() const; void constrain(double& scale, double& x, double& y) const; - LatLngBounds bounds = LatLngBounds::world(); + optional<LatLngBounds> bounds; // Limit the amount of zooming possible on the map. double min_scale = std::pow(2, 0); |