Files
MapLibreParticleLab/src/mbgl/annotation/annotation_tile.hpp
Bart Louwers 550f64be22 core: rename mbgl namespace to mln (#4487)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-08-14 23:25:20 +02:00

68 lines
1.9 KiB
C++

#pragma once
#include <mbgl/annotation/annotation.hpp>
#include <mbgl/tile/geometry_tile.hpp>
#include <mbgl/tile/geometry_tile_data.hpp>
namespace mln {
class AnnotationManager;
class TileParameters;
class AnnotationTile : public GeometryTile {
public:
AnnotationTile(const OverscaledTileID&, const TileParameters&, TileObserver*);
~AnnotationTile() override;
private:
mapbox::base::WeakPtr<AnnotationManager> annotationManager;
};
class AnnotationTileFeatureData;
class AnnotationTileFeature : public GeometryTileFeature {
public:
AnnotationTileFeature(std::shared_ptr<const AnnotationTileFeatureData>);
~AnnotationTileFeature() override;
FeatureType getType() const override;
std::optional<Value> getValue(const std::string&) const override;
FeatureIdentifier getID() const override;
const GeometryCollection& getGeometries() const override;
private:
std::shared_ptr<const AnnotationTileFeatureData> data;
};
class AnnotationTileLayerData;
class AnnotationTileLayer : public GeometryTileLayer {
public:
AnnotationTileLayer(std::shared_ptr<AnnotationTileLayerData>);
std::size_t featureCount() const override;
std::unique_ptr<GeometryTileFeature> getFeature(std::size_t i) const override;
std::string getName() const override;
void addFeature(AnnotationID,
FeatureType,
GeometryCollection,
std::unordered_map<std::string, std::string> properties = {{}});
private:
std::shared_ptr<AnnotationTileLayerData> layer;
};
class AnnotationTileData : public GeometryTileData {
public:
std::unique_ptr<GeometryTileData> clone() const override;
std::unique_ptr<GeometryTileLayer> getLayer(const std::string&) const override;
std::unique_ptr<AnnotationTileLayer> addLayer(const std::string&);
private:
std::unordered_map<std::string, std::shared_ptr<AnnotationTileLayerData>> layers;
};
} // namespace mln