summaryrefslogtreecommitdiff
path: root/include/mbgl/style/sources/vector_source.hpp
blob: 8626ce160a247c726d805c6d6a3c474dec490e77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once

#include <mbgl/style/source.hpp>
#include <mbgl/util/tileset.hpp>
#include <mbgl/util/variant.hpp>

namespace mbgl {
namespace style {

class VectorSource : public Source {
public:
    VectorSource(std::string id, variant<std::string, Tileset> urlOrTileset);

    optional<std::string> getURL() const;

    // Private implementation

    class Impl;
    Impl* const impl;
};

template <>
inline bool Source::is<VectorSource>() const {
    return type == SourceType::Vector;
}

} // namespace style
} // namespace mbgl