diff --git a/src/mbgl/map/geometry_tile.hpp b/src/mbgl/map/geometry_tile.hpp index 037b7a0db..f94ce15d7 100644 --- a/src/mbgl/map/geometry_tile.hpp +++ b/src/mbgl/map/geometry_tile.hpp @@ -19,7 +19,7 @@ namespace mbgl { -enum class GeometryFeatureType : uint8_t { +enum class FeatureType : uint8_t { Unknown = 0, Point = 1, LineString = 2, @@ -30,7 +30,7 @@ typedef std::vector> GeometryCollection; class GeometryTileFeature : public mbgl::util::noncopyable { public: - virtual GeometryFeatureType getType() const = 0; + virtual FeatureType getType() const = 0; virtual mapbox::util::optional getValue(const std::string& key) const = 0; virtual GeometryCollection getGeometries() const = 0; }; diff --git a/src/mbgl/map/vector_tile.cpp b/src/mbgl/map/vector_tile.cpp index b90237e72..501ae4ff6 100644 --- a/src/mbgl/map/vector_tile.cpp +++ b/src/mbgl/map/vector_tile.cpp @@ -34,7 +34,7 @@ VectorTileFeature::VectorTileFeature(pbf feature_pbf, const VectorTileLayer& lay } } } else if (feature_pbf.tag == 3) { // type - type = (GeometryFeatureType)feature_pbf.varint(); + type = (FeatureType)feature_pbf.varint(); } else if (feature_pbf.tag == 4) { // geometry geometry_pbf = feature_pbf.message(); } else { diff --git a/src/mbgl/map/vector_tile.hpp b/src/mbgl/map/vector_tile.hpp index b92983569..a7521cd32 100644 --- a/src/mbgl/map/vector_tile.hpp +++ b/src/mbgl/map/vector_tile.hpp @@ -12,13 +12,13 @@ class VectorTileFeature : public GeometryTileFeature { public: VectorTileFeature(pbf, const VectorTileLayer&); - virtual GeometryFeatureType getType() const { return type; } + virtual FeatureType getType() const { return type; } virtual mapbox::util::optional getValue(const std::string&) const; virtual GeometryCollection getGeometries() const; private: uint64_t id = 0; - GeometryFeatureType type = GeometryFeatureType::Unknown; + FeatureType type = FeatureType::Unknown; std::map properties; pbf geometry_pbf; }; diff --git a/src/mbgl/style/filter_expression.cpp b/src/mbgl/style/filter_expression.cpp index e5a2e3abc..ec44b57b5 100644 --- a/src/mbgl/style/filter_expression.cpp +++ b/src/mbgl/style/filter_expression.cpp @@ -5,14 +5,14 @@ namespace mbgl { Value parseFeatureType(const Value& value) { if (value == std::string("Point")) { - return Value(uint64_t(GeometryFeatureType::Point)); + return Value(uint64_t(FeatureType::Point)); } else if (value == std::string("LineString")) { - return Value(uint64_t(GeometryFeatureType::LineString)); + return Value(uint64_t(FeatureType::LineString)); } else if (value == std::string("Polygon")) { - return Value(uint64_t(GeometryFeatureType::Polygon)); + return Value(uint64_t(FeatureType::Polygon)); } else { Log::Warning(Event::ParseStyle, "value for $type filter must be Point, LineString, or Polygon"); - return Value(uint64_t(GeometryFeatureType::Unknown)); + return Value(uint64_t(FeatureType::Unknown)); } }