1#pragma once
2
3#include <mbgl/util/chrono.hpp>
4#include <mbgl/util/unitbezier.hpp>
5
6#include <cmath>
7#include <string>
8#include <vector>
9
10namespace mbgl {
11
12namespace util {
13
14constexpr double tileSize = 512;
15
16/*
17 * The maximum extent of a feature that can be safely stored in the buffer.
18 * In practice, all features are converted to this extent before being added.
19 *
20 * Positions are stored as signed 16bit integers.
21 * One bit is lost for signedness to support features extending past the left edge of the tile.
22 * One bit is lost because the line vertex buffer used to pack 1 bit of other data into the int.
23 * This is no longer the case but we're reserving this bit anyway.
24 * One bit is lost to support features extending past the extent on the right edge of the tile.
25 * This leaves us with 2^13 = 8192
26 */
27constexpr int32_t EXTENT = 8192;
28
29constexpr double DEG2RAD = M_PI / 180.0;
30constexpr double RAD2DEG = 180.0 / M_PI;
31constexpr double M2PI = M_PI * 2;
32constexpr double EARTH_RADIUS_M = 6378137;
33constexpr double LATITUDE_MAX = 85.051128779806604;
34constexpr double LONGITUDE_MAX = 180;
35constexpr double DEGREES_MAX = 360;
36constexpr double PITCH_MAX = M_PI / 3;
37constexpr double MIN_ZOOM = 0.0;
38constexpr double MAX_ZOOM = 25.5;
39constexpr float MIN_ZOOM_F = MIN_ZOOM;
40constexpr float MAX_ZOOM_F = MAX_ZOOM;
41constexpr uint8_t DEFAULT_MAX_ZOOM = 22;
42
43constexpr uint8_t DEFAULT_PREFETCH_ZOOM_DELTA = 4;
44
45constexpr uint64_t DEFAULT_MAX_CACHE_SIZE = 50 * 1024 * 1024;
46
47constexpr Duration DEFAULT_TRANSITION_DURATION = Milliseconds(300);
48constexpr Seconds CLOCK_SKEW_RETRY_TIMEOUT { 30 };
49
50constexpr UnitBezier DEFAULT_TRANSITION_EASE = { 0, 0, 0.25, 1 };
51
52constexpr int DEFAULT_RATE_LIMIT_TIMEOUT = 5;
53
54constexpr const char* API_BASE_URL = "https://api.mapbox.com";
55
56} // namespace util
57
58namespace debug {
59
60extern const bool tileParseWarnings;
61extern const bool styleParseWarnings;
62extern const bool spriteWarnings;
63extern const bool renderWarnings;
64extern const bool labelTextMissingWarning;
65extern const bool missingFontStackWarning;
66extern const bool missingFontFaceWarning;
67extern const bool glyphWarning;
68extern const bool shapingWarning;
69
70} // namespace debug
71
72} // namespace mbgl
73

source code of qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/constants.hpp