blob: 5b4e4e2e1521b398f5001d0549d8fced9aa58f37 (
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
38
39
40
41
42
43
44
45
46
47
|
#ifndef MBGL_MAP_SOURCE_INFO
#define MBGL_MAP_SOURCE_INFO
#include <mbgl/style/types.hpp>
#include <mbgl/map/tile_id.hpp>
#include <mbgl/util/noncopyable.hpp>
#include <mbgl/util/constants.hpp>
#include <mapbox/variant.hpp>
#include <rapidjson/document.h>
#include <array>
#include <vector>
#include <cstdint>
namespace mapbox {
namespace geojsonvt {
class GeoJSONVT;
} // namespace geojsonvt
} // namespace mapbox
namespace mbgl {
class SourceInfo : private util::noncopyable {
public:
~SourceInfo();
SourceType type = SourceType::Vector;
std::string url;
std::vector<std::string> tiles;
uint16_t tile_size = util::tileSize;
uint16_t min_zoom = 0;
uint16_t max_zoom = 22;
std::string attribution;
std::array<float, 3> center = { { 0, 0, 0 } };
std::array<float, 4> bounds = { { -180, -90, 180, 90 } };
std::string source_id = "";
std::unique_ptr<mapbox::geojsonvt::GeoJSONVT> geojsonvt;
void parseTileJSONProperties(const rapidjson::Value&);
std::string tileURL(const TileID& id, float pixelRatio) const;
};
} // namespace mbgl
#endif // MBGL_MAP_SOURCE_INFO
|