#pragma once #include #include #include namespace mapbox { namespace geojsonvt { class GeoJSONVT; } // namespace geojsonvt } // namespace mapbox namespace mbgl { class AsyncRequest; namespace style { class GeoJSONSource : public Source { public: using GeoJSON = std::unique_ptr; static std::unique_ptr parse(const std::string& id, const JSValue&); static GeoJSON parseGeoJSON(const JSValue&); GeoJSONSource(std::string id, variant urlOrGeoJSON); ~GeoJSONSource() final; void load(FileSource&) final; uint16_t getTileSize() const final { return util::tileSize; } const variant& getURLOrGeoJSON() const { return urlOrGeoJSON; } private: Range getZoomRange() final; std::unique_ptr createTile(const OverscaledTileID&, const UpdateParameters&) final; variant urlOrGeoJSON; std::unique_ptr req; }; } // namespace style } // namespace mbgl