#pragma once #include #include #include namespace mbgl { class AsyncRequest; namespace style { class VectorSource final : public Source { public: VectorSource(std::string id, variant urlOrTileset, optional maxZoom = nullopt, optional minZoom = nullopt); ~VectorSource() final; const variant& getURLOrTileset() const; optional getURL() const; class Impl; const Impl& impl() const; void loadDescription(FileSource&) final; bool supportsLayerType(const mbgl::style::LayerTypeInfo*) const override; mapbox::base::WeakPtr makeWeakPtr() override { return weakFactory.makeWeakPtr(); } private: const variant urlOrTileset; std::unique_ptr req; mapbox::base::WeakPtrFactory weakFactory {this}; optional maxZoom; optional minZoom; }; template <> inline bool Source::is() const { return getType() == SourceType::Vector; } } // namespace style } // namespace mbgl