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

namespace mbgl {
namespace style {

RasterSource::Impl::Impl(SourceType sourceType, std::string id_, uint16_t tileSize_)
    : Source::Impl(sourceType, std::move(id_)),
      tileSize(tileSize_) {
}

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

uint16_t RasterSource::Impl::getTileSize() const {
    return tileSize;
}

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

} // namespace style
} // namespace mbgl