blob: dd2afca12700fee177599ad8c49e46981a76583d (
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
|
#include <mbgl/annotation/annotation_tile.hpp>
#include <mbgl/annotation/annotation_manager.hpp>
#include <mbgl/util/constants.hpp>
#include <mbgl/storage/file_source.hpp>
#include <utility>
namespace mbgl {
AnnotationTileFeature::AnnotationTileFeature(FeatureType type_, GeometryCollection geometries_,
std::unordered_map<std::string, std::string> properties_)
: type(type_),
properties(std::move(properties_)),
geometries(std::move(geometries_)) {}
optional<Value> AnnotationTileFeature::getValue(const std::string& key) const {
auto it = properties.find(key);
if (it != properties.end()) {
return optional<Value>(it->second);
}
return optional<Value>();
}
AnnotationTileLayer::AnnotationTileLayer(const std::string &name_)
: name(name_) {}
util::ptr<GeometryTileLayer> AnnotationTile::getLayer(const std::string& name) const {
auto it = layers.find(name);
if (it != layers.end()) {
return it->second;
}
return nullptr;
}
} // namespace mbgl
|