#pragma once #include #include #include namespace mbgl { class AnnotationManager; class TileParameters; class AnnotationTile : public GeometryTile { public: AnnotationTile(const OverscaledTileID&, const TileParameters&); ~AnnotationTile() override; void setNecessity(Necessity) final; private: AnnotationManager& annotationManager; }; class AnnotationTileFeatureData; class AnnotationTileFeature : public GeometryTileFeature { public: AnnotationTileFeature(std::shared_ptr); ~AnnotationTileFeature() override; FeatureType getType() const override; optional getValue(const std::string&) const override; optional getID() const override; GeometryCollection getGeometries() const override; private: std::shared_ptr data; }; class AnnotationTileLayer : public GeometryTileLayer { public: AnnotationTileLayer(std::string); std::size_t featureCount() const override { return features.size(); } std::unique_ptr getFeature(std::size_t i) const override { return std::make_unique(features.at(i)); } std::string getName() const override { return name; } void addFeature(const AnnotationID, FeatureType, GeometryCollection, std::unordered_map properties = { {} }); private: std::vector> features; std::string name; }; class AnnotationTileData : public GeometryTileData { public: std::unique_ptr clone() const override; const GeometryTileLayer* getLayer(const std::string&) const override; AnnotationTileLayer& addLayer(const std::string&); private: std::unordered_map layers; }; } // namespace mbgl