[core] Default GeometryTileFeature::getGeometries() implementation
This commit is contained in:
@@ -17,7 +17,6 @@ public:
|
||||
}
|
||||
PropertyMap getProperties() const override { return feature.properties; }
|
||||
FeatureIdentifier getID() const override { return feature.id; }
|
||||
const GeometryCollection& getGeometries() const override { return geometry; }
|
||||
optional<mbgl::Value> getValue(const std::string& key) const override {
|
||||
auto it = feature.properties.find(key);
|
||||
if (it != feature.properties.end()) {
|
||||
@@ -25,8 +24,6 @@ public:
|
||||
}
|
||||
return optional<mbgl::Value>();
|
||||
}
|
||||
|
||||
GeometryCollection geometry;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -180,4 +180,9 @@ Feature convertFeature(const GeometryTileFeature& geometryTileFeature, const Can
|
||||
return feature;
|
||||
}
|
||||
|
||||
const GeometryCollection& GeometryTileFeature::getGeometries() const {
|
||||
static const GeometryCollection dummy;
|
||||
return dummy;
|
||||
}
|
||||
|
||||
} // namespace mbgl
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
virtual optional<Value> getValue(const std::string& key) const = 0;
|
||||
virtual PropertyMap getProperties() const { return PropertyMap(); }
|
||||
virtual FeatureIdentifier getID() const { return NullValue {}; }
|
||||
virtual const GeometryCollection& getGeometries() const = 0;
|
||||
virtual const GeometryCollection& getGeometries() const;
|
||||
};
|
||||
|
||||
class GeometryTileLayer {
|
||||
|
||||
Reference in New Issue
Block a user