Revert FeatureType rename
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user