summaryrefslogtreecommitdiff
path: root/include/mbgl/util/geo.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/util/geo.hpp')
-rw-r--r--include/mbgl/util/geo.hpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/mbgl/util/geo.hpp b/include/mbgl/util/geo.hpp
index 98b5daa6f5..4112b183b2 100644
--- a/include/mbgl/util/geo.hpp
+++ b/include/mbgl/util/geo.hpp
@@ -41,12 +41,19 @@ struct ProjectedMeters {
};
struct LatLngBounds {
- LatLng sw = {90, 180};
- LatLng ne = {-90, -180};
+ LatLng sw = {-90, -180};
+ LatLng ne = {90, 180};
- inline LatLngBounds(const LatLng& sw_ = {90, 180}, const LatLng& ne_ = {-90, -180})
+ inline LatLngBounds() {}
+
+ inline LatLngBounds(const LatLng& sw_, const LatLng& ne_)
: sw(sw_), ne(ne_) {}
+ static inline LatLngBounds getExtendable() {
+ LatLngBounds bounds;
+ return { bounds.ne, bounds.sw };
+ }
+
inline operator bool() const {
return sw && ne;
}