summaryrefslogtreecommitdiff
path: root/src/mbgl/style/sources/vector_source_impl.cpp
blob: b06f0557bf511e81ed99b604bd7218347dc0b4f9 (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
#include <mbgl/style/sources/vector_source_impl.hpp>

namespace mbgl {
namespace style {

VectorSource::Impl::Impl(std::string id_)
    : Source::Impl(SourceType::Vector, std::move(id_)) {
}

VectorSource::Impl::Impl(const Impl& other, Tileset tileset_)
    : Source::Impl(other),
      tileset(std::move(tileset_)) {
}

optional<Tileset> VectorSource::Impl::getTileset() const {
    return tileset;
}

optional<std::string> VectorSource::Impl::getAttribution() const {
    if (!tileset) {
        return {};
    }
    return tileset->attribution;
}

} // namespace style
} // namespace mbgl