summaryrefslogtreecommitdiff
path: root/include/mbgl/util
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2018-11-06 16:11:47 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2018-11-13 17:28:26 +0200
commitbf8b24fa8d30df374ee36be781b6a572036187b9 (patch)
treebdca15eef94898a879e4f3737eee2dc44efa275f /include/mbgl/util
parent4e15a0c8cd7c906908d97da10f75b35a3bc2ed9e (diff)
downloadqtlocation-mapboxgl-bf8b24fa8d30df374ee36be781b6a572036187b9.tar.gz
[build] Update to geometry v1.0.0
Diffstat (limited to 'include/mbgl/util')
-rw-r--r--include/mbgl/util/feature.hpp12
-rw-r--r--include/mbgl/util/geometry.hpp3
2 files changed, 9 insertions, 6 deletions
diff --git a/include/mbgl/util/feature.hpp b/include/mbgl/util/feature.hpp
index 4eeceda944..9e2286018c 100644
--- a/include/mbgl/util/feature.hpp
+++ b/include/mbgl/util/feature.hpp
@@ -2,15 +2,15 @@
#include <mbgl/util/optional.hpp>
-#include <mapbox/geometry/feature.hpp>
+#include <mapbox/feature.hpp>
namespace mbgl {
-using Value = mapbox::geometry::value;
-using NullValue = mapbox::geometry::null_value_t;
-using PropertyMap = mapbox::geometry::property_map;
-using FeatureIdentifier = mapbox::geometry::identifier;
-using Feature = mapbox::geometry::feature<double>;
+using Value = mapbox::feature::value;
+using NullValue = mapbox::feature::null_value_t;
+using PropertyMap = mapbox::feature::property_map;
+using FeatureIdentifier = mapbox::feature::identifier;
+using Feature = mapbox::feature::feature<double>;
template <class T>
optional<T> numericValue(const Value& value) {
diff --git a/include/mbgl/util/geometry.hpp b/include/mbgl/util/geometry.hpp
index a28c59a47d..17384f2224 100644
--- a/include/mbgl/util/geometry.hpp
+++ b/include/mbgl/util/geometry.hpp
@@ -13,6 +13,8 @@ enum class FeatureType : uint8_t {
Polygon = 3
};
+using EmptyGeometry = mapbox::geometry::empty;
+
template <class T>
using Point = mapbox::geometry::point<T>;
@@ -43,6 +45,7 @@ Point<S> convertPoint(const Point<T>& p) {
}
struct ToFeatureType {
+ FeatureType operator()(const EmptyGeometry&) const { return FeatureType::Unknown; }
template <class T>
FeatureType operator()(const Point<T> &) const { return FeatureType::Point; }
template <class T>