#pragma once #include #include #include #include #include #include #include namespace mbgl { class AsyncRequest; class GeometryTileData; class FeatureIndex; namespace style { class Style; } // namespace style class GeometryTile : public Tile { public: GeometryTile(const OverscaledTileID&, std::string sourceID, style::Style&, const MapMode); ~GeometryTile() override; void setError(std::exception_ptr err); void setData(std::unique_ptr); Bucket* getBucket(const style::Layer&) override; bool parsePending() override; void redoPlacement(PlacementConfig) override; void queryRenderedFeatures( std::unordered_map>& result, const GeometryCoordinates& queryGeometry, const TransformState&, const optional>& layerIDs) override; void cancel() override; private: void redoPlacement(); style::Style& style; Worker& worker; TileWorker tileWorker; std::unique_ptr workRequest; // Contains all the Bucket objects for the tile. Buckets are render // objects and they get added by tile parsing operations. std::unordered_map> buckets; std::unique_ptr featureIndex; std::unique_ptr data; // Stores the placement configuration of the text that is currently placed on the screen. PlacementConfig placedConfig; // Stores the placement configuration of how the text should be placed. This isn't necessarily // the one that is being displayed. PlacementConfig targetConfig; // Used to signal the worker that it should abandon parsing this tile as soon as possible. util::Atomic obsolete { false }; }; } // namespace mbgl