summaryrefslogtreecommitdiff
path: root/src/mbgl/annotation/annotation_source.cpp
blob: c52836c500316db86dd2c8adfc0f9da9873a2c97 (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
30
#include <mbgl/annotation/annotation_source.hpp>
#include <mbgl/annotation/annotation_manager.hpp>
#include <mbgl/annotation/annotation_tile.hpp>

namespace mbgl {

using namespace style;

AnnotationSource::AnnotationSource()
    : Source(SourceType::Annotations, std::make_unique<Impl>(*this)) {
}

AnnotationSource::Impl::Impl(Source& base_)
    : Source::Impl(SourceType::Annotations, AnnotationManager::SourceID, base_) {
}

optional<Range<uint8_t>> AnnotationSource::Impl::getZoomRange() const {
    return { { 0, 22 } };
}

void AnnotationSource::Impl::loadDescription(FileSource&) {
    loaded = true;
}

std::unique_ptr<Tile> AnnotationSource::Impl::createTile(const OverscaledTileID& tileID,
                                                         const style::UpdateParameters& parameters) {
    return std::make_unique<AnnotationTile>(tileID, parameters);
}

} // namespace mbgl