summaryrefslogtreecommitdiff
path: root/include/mbgl/util
diff options
context:
space:
mode:
authorAsheem Mamoowala <asheem.mamoowala@mapbox.com>2017-10-02 13:42:26 -0700
committerAsheem Mamoowala <asheem.mamoowala@mapbox.com>2017-10-09 13:58:11 -0700
commitdf20b0cbecb25b8bc6812c4a558fc0f0e6cfb7ed (patch)
tree82ce36b376894b4416c7df05f2d899a8a69bb8e0 /include/mbgl/util
parent9048d6cfd0f794af3f3810a880adb0d2fc691552 (diff)
downloadqtlocation-mapboxgl-df20b0cbecb25b8bc6812c4a558fc0f0e6cfb7ed.tar.gz
[core] Add `cameraForLatLngs()` method with modified bearing
Diffstat (limited to 'include/mbgl/util')
-rw-r--r--include/mbgl/util/geometry.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/mbgl/util/geometry.hpp b/include/mbgl/util/geometry.hpp
index 6dc16bc514..a28c59a47d 100644
--- a/include/mbgl/util/geometry.hpp
+++ b/include/mbgl/util/geometry.hpp
@@ -2,6 +2,7 @@
#include <mapbox/geometry/geometry.hpp>
#include <mapbox/geometry/point_arithmetic.hpp>
+#include <mapbox/geometry/for_each_point.hpp>
namespace mbgl {
@@ -58,4 +59,9 @@ struct ToFeatureType {
FeatureType operator()(const mapbox::geometry::geometry_collection<T> &) const { return FeatureType::Unknown; }
};
+template <class T, typename F>
+auto forEachPoint(const Geometry<T>& g, F f) {
+ mapbox::geometry::for_each_point(g, f);
+}
+
} // namespace mbgl