1#pragma once
2
3#include <mbgl/style/source.hpp>
4#include <mbgl/util/tileset.hpp>
5#include <mbgl/util/variant.hpp>
6
7namespace mbgl {
8
9class AsyncRequest;
10
11namespace style {
12
13class VectorSource : public Source {
14public:
15 VectorSource(std::string id, variant<std::string, Tileset> urlOrTileset);
16 ~VectorSource() final;
17
18 const variant<std::string, Tileset>& getURLOrTileset() const;
19 optional<std::string> getURL() const;
20
21 class Impl;
22 const Impl& impl() const;
23
24 void loadDescription(FileSource&) final;
25
26private:
27 const variant<std::string, Tileset> urlOrTileset;
28 std::unique_ptr<AsyncRequest> req;
29};
30
31template <>
32inline bool Source::is<VectorSource>() const {
33 return getType() == SourceType::Vector;
34}
35
36} // namespace style
37} // namespace mbgl
38

source code of qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/style/sources/vector_source.hpp