1 | #include <mbgl/tile/vector_tile.hpp> |
2 | #include <mbgl/tile/vector_tile_data.hpp> |
3 | #include <mbgl/tile/tile_loader_impl.hpp> |
4 | #include <mbgl/renderer/tile_parameters.hpp> |
5 | |
6 | namespace mbgl { |
7 | |
8 | VectorTile::VectorTile(const OverscaledTileID& id_, |
9 | std::string sourceID_, |
10 | const TileParameters& parameters, |
11 | const Tileset& tileset) |
12 | : GeometryTile(id_, sourceID_, parameters), loader(*this, id_, parameters, tileset) { |
13 | } |
14 | |
15 | void VectorTile::setNecessity(TileNecessity necessity) { |
16 | loader.setNecessity(necessity); |
17 | } |
18 | |
19 | void VectorTile::setMetadata(optional<Timestamp> modified_, optional<Timestamp> expires_) { |
20 | modified = modified_; |
21 | expires = expires_; |
22 | } |
23 | |
24 | void VectorTile::setData(std::shared_ptr<const std::string> data_) { |
25 | GeometryTile::setData(data_ ? std::make_unique<VectorTileData>(args&: data_) : nullptr); |
26 | } |
27 | |
28 | } // namespace mbgl |
29 | |