[core] Expose getChildren, getLeaves, getClusterExpansionZoom on SuperclusterData
This commit is contained in:
@@ -21,6 +21,20 @@ public:
|
||||
return impl.getTile(tileID.z, tileID.x, tileID.y).features;
|
||||
}
|
||||
|
||||
mapbox::feature::feature_collection<double> getChildren(const std::uint32_t) final {
|
||||
return {};
|
||||
}
|
||||
|
||||
mapbox::feature::feature_collection<double> getLeaves(const std::uint32_t,
|
||||
const std::uint32_t,
|
||||
const std::uint32_t) final {
|
||||
return {};
|
||||
}
|
||||
|
||||
std::uint8_t getClusterExpansionZoom(std::uint32_t) final {
|
||||
return 0;
|
||||
}
|
||||
|
||||
private:
|
||||
mapbox::geojsonvt::GeoJSONVT impl;
|
||||
};
|
||||
@@ -35,6 +49,20 @@ public:
|
||||
return impl.getTile(tileID.z, tileID.x, tileID.y);
|
||||
}
|
||||
|
||||
mapbox::feature::feature_collection<double> getChildren(const std::uint32_t cluster_id) final {
|
||||
return impl.getChildren(cluster_id);
|
||||
}
|
||||
|
||||
mapbox::feature::feature_collection<double> getLeaves(const std::uint32_t cluster_id,
|
||||
const std::uint32_t limit,
|
||||
const std::uint32_t offset) final {
|
||||
return impl.getLeaves(cluster_id, limit, offset);
|
||||
}
|
||||
|
||||
std::uint8_t getClusterExpansionZoom(std::uint32_t cluster_id) final {
|
||||
return impl.getClusterExpansionZoom(cluster_id);
|
||||
}
|
||||
|
||||
private:
|
||||
mapbox::supercluster::Supercluster impl;
|
||||
};
|
||||
|
||||
@@ -15,6 +15,13 @@ class GeoJSONData {
|
||||
public:
|
||||
virtual ~GeoJSONData() = default;
|
||||
virtual mapbox::feature::feature_collection<int16_t> getTile(const CanonicalTileID&) = 0;
|
||||
|
||||
// SuperclusterData
|
||||
virtual mapbox::feature::feature_collection<double> getChildren(const std::uint32_t) = 0;
|
||||
virtual mapbox::feature::feature_collection<double> getLeaves(const std::uint32_t,
|
||||
const std::uint32_t limit = 10u,
|
||||
const std::uint32_t offset = 0u) = 0;
|
||||
virtual std::uint8_t getClusterExpansionZoom(std::uint32_t) = 0;
|
||||
};
|
||||
|
||||
class GeoJSONSource::Impl : public Source::Impl {
|
||||
|
||||
Reference in New Issue
Block a user