diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-03-09 17:58:33 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-03-09 18:32:20 -0700 |
commit | 4d3dcea82c44f36d3b3cc4e284373d98410ae689 (patch) | |
tree | e2c7c1389c277420423d832040ab8c07bd638f35 /src | |
parent | b7f04ee7c231d8165411161ff3f88138945da702 (diff) | |
download | qtlocation-mapboxgl-4d3dcea82c44f36d3b3cc4e284373d98410ae689.tar.gz |
Revert FeatureType rename
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/map/geometry_tile.hpp | 4 | ||||
-rw-r--r-- | src/mbgl/map/vector_tile.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/map/vector_tile.hpp | 4 | ||||
-rw-r--r-- | src/mbgl/style/filter_expression.cpp | 8 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/mbgl/map/geometry_tile.hpp b/src/mbgl/map/geometry_tile.hpp index 037b7a0db2..f94ce15d7c 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<std::vector<Coordinate>> GeometryCollection; class GeometryTileFeature : public mbgl::util::noncopyable { public: - virtual GeometryFeatureType getType() const = 0; + virtual FeatureType getType() const = 0; virtual mapbox::util::optional<Value> 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 b90237e72b..501ae4ff62 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 b929835692..a7521cd327 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<Value> getValue(const std::string&) const; virtual GeometryCollection getGeometries() const; private: uint64_t id = 0; - GeometryFeatureType type = GeometryFeatureType::Unknown; + FeatureType type = FeatureType::Unknown; std::map<std::string, Value> properties; pbf geometry_pbf; }; diff --git a/src/mbgl/style/filter_expression.cpp b/src/mbgl/style/filter_expression.cpp index e5a2e3abc3..ec44b57b55 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)); } } |