blob: 318241a91453517d05df603b2c4eb913308e335b (
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
31
32
33
34
35
36
37
|
#include <mbgl/annotation/annotation_manager.hpp>
#include <mbgl/annotation/annotation_source.hpp>
#include <mbgl/style/layer.hpp>
namespace mbgl {
using namespace style;
AnnotationSource::AnnotationSource()
: Source(makeMutable<Impl>()) {
}
AnnotationSource::Impl::Impl()
: Source::Impl(SourceType::Annotations, AnnotationManager::SourceID) {
}
const AnnotationSource::Impl& AnnotationSource::impl() const {
return static_cast<const Impl&>(*baseImpl);
}
void AnnotationSource::loadDescription(FileSource&) {
loaded = true;
}
optional<std::string> AnnotationSource::Impl::getAttribution() const {
return {};
}
bool AnnotationSource::supportsLayerType(const mbgl::style::LayerTypeInfo* info) const {
return !std::strcmp(info->type, "line") || !std::strcmp(info->type, "symbol") || !std::strcmp(info->type, "fill");
}
Mutable<Source::Impl> AnnotationSource::createMutable() const noexcept {
return staticMutableCast<Source::Impl>(makeMutable<Impl>(impl()));
}
} // namespace mbgl
|