diff options
author | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2017-10-02 13:42:26 -0700 |
---|---|---|
committer | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2017-10-09 11:42:37 -0700 |
commit | 2366487275ce90022bac67d51205e3011bca6f0a (patch) | |
tree | 9423626f1f20864805f7fc142e501e0ad0b5a32a /include/mbgl/util | |
parent | 6cf153a6de2a32f29d3de5fff2fed435990a875c (diff) | |
download | qtlocation-mapboxgl-2366487275ce90022bac67d51205e3011bca6f0a.tar.gz |
[core] Add `cameraForLatLngs()` method with modified bearing
Diffstat (limited to 'include/mbgl/util')
-rw-r--r-- | include/mbgl/util/geometry.hpp | 6 |
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 |