#pragma once #include #include #include namespace mbgl { class AsyncRequest; class CanonicalTileID; namespace style { class GeoJSONData { public: virtual ~GeoJSONData() = default; virtual mapbox::geometry::feature_collection getTile(const CanonicalTileID&) = 0; }; class GeoJSONSource::Impl : public Source::Impl { public: Impl(std::string id, Source&, const GeoJSONOptions); ~Impl() final; void setURL(std::string); optional getURL() const; Range getZoomRange() const; void setGeoJSON(const GeoJSON&); GeoJSONData* getData() const; void loadDescription(FileSource&) final; std::unique_ptr createRenderSource() const final; private: void _setGeoJSON(const GeoJSON&); GeoJSONOptions options; optional url; std::unique_ptr req; std::unique_ptr data; }; } // namespace style } // namespace mbgl