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
6namespace mbgl {
7
8VectorTile::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
15void VectorTile::setNecessity(TileNecessity necessity) {
16 loader.setNecessity(necessity);
17}
18
19void VectorTile::setMetadata(optional<Timestamp> modified_, optional<Timestamp> expires_) {
20 modified = modified_;
21 expires = expires_;
22}
23
24void 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

source code of qtlocation/src/3rdparty/mapbox-gl-native/src/mbgl/tile/vector_tile.cpp