Rework GeometryTile* interface
This commit is contained in:
@@ -1,24 +1,16 @@
|
||||
#include <mbgl/map/geometry_tile.hpp>
|
||||
#include <mbgl/style/filter_expression_private.hpp>
|
||||
|
||||
#include <iostream>
|
||||
namespace mbgl {
|
||||
|
||||
using namespace mbgl;
|
||||
|
||||
std::ostream& mbgl::operator<<(std::ostream& os, const GeometryFeatureType& type) {
|
||||
switch (type) {
|
||||
case GeometryFeatureType::Unknown: return os << "Unknown";
|
||||
case GeometryFeatureType::Point: return os << "Point";
|
||||
case GeometryFeatureType::LineString: return os << "LineString";
|
||||
case GeometryFeatureType::Polygon: return os << "Polygon";
|
||||
default: return os << "Invalid";
|
||||
mapbox::util::optional<Value> GeometryTileFeatureExtractor::getValue(const std::string& key) const {
|
||||
if (key == "$type") {
|
||||
return Value(uint64_t(feature.getType()));
|
||||
}
|
||||
|
||||
return feature.getValue(key);
|
||||
}
|
||||
|
||||
std::ostream& mbgl::operator<<(std::ostream& os, const GeometryTileFeature& feature) {
|
||||
os << "Feature(" << feature.getID() << "): " << feature.getType() << std::endl;
|
||||
for (const auto& prop : feature.getProperties()) {
|
||||
os << " - " << prop.first << ": " << &prop.second << std::endl;
|
||||
}
|
||||
return os;
|
||||
template bool evaluate(const FilterExpression&, const GeometryTileFeatureExtractor&);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user