summaryrefslogtreecommitdiff
path: root/include/mbgl/util/geo.hpp
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2015-11-11 16:48:58 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2015-11-11 16:59:49 +0200
commitaa8857643d404a5512b1bc3cec380e56f88b6f75 (patch)
treef7b5dff95ae661b4ca0877a20ff861f31636a5a3 /include/mbgl/util/geo.hpp
parentcd0266f25cc96358e665b6f39e358a263f6d4ab8 (diff)
downloadqtlocation-mapboxgl-aa8857643d404a5512b1bc3cec380e56f88b6f75.tar.gz
[core] Added MetersBounds
Diffstat (limited to 'include/mbgl/util/geo.hpp')
-rw-r--r--include/mbgl/util/geo.hpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/mbgl/util/geo.hpp b/include/mbgl/util/geo.hpp
index 7e2ad998b9..dd2b1567fc 100644
--- a/include/mbgl/util/geo.hpp
+++ b/include/mbgl/util/geo.hpp
@@ -54,7 +54,7 @@ struct LatLngBounds {
LatLng sw = {90, 180};
LatLng ne = {-90, -180};
- inline LatLngBounds(LatLng sw_ = {90, 180}, LatLng ne_ = {-90, -180})
+ inline LatLngBounds(const LatLng& sw_ = {90, 180}, const LatLng& ne_ = {-90, -180})
: sw(sw_), ne(ne_) {}
inline bool isValid() const {
@@ -91,6 +91,18 @@ struct LatLngBounds {
}
};
+struct MetersBounds {
+ ProjectedMeters sw;
+ ProjectedMeters ne;
+
+ inline MetersBounds(const ProjectedMeters& sw_, const ProjectedMeters& ne_)
+ : sw(sw_), ne(ne_) {}
+
+ inline bool isValid() const {
+ return sw.isValid() && ne.isValid();
+ }
+};
+
}
#endif