Fixed unit tests, more accurate limits for latitude coordinates.
[situare] / src / common.h
1 #ifndef COMMON_H
2 #define COMMON_H
3
4 #include <QtCore>
5
6 static const int TILE_SIZE_X = 256; ///< Tile image size in x direction
7 static const int TILE_SIZE_Y = 256; ///< Tile image size in y direction
8
9 static const int MIN_MAP_ZOOM_LEVEL = 0; ///< Minimum zoom level
10 static const int MAX_MAP_ZOOM_LEVEL = 18; ///< Maximum zoom level
11 static const int MIN_MAP_SCENE_NORMAL_LEVEL = MAX_MAP_ZOOM_LEVEL + 1;
12
13 static const int ZOOM_FPS = 30; ///< FPS for the zoom effect
14 static const qreal ZOOM_TIME = 0.25; ///< Length of the zoom effect (seconds)
15
16 static const qreal MAX_LATITUDE = 85.05112877980659237802;  ///< Maximum latitude value
17 static const qreal MIN_LATITUDE = -MAX_LATITUDE; ///< Minimum latitude value
18 static const qreal MIN_LONGITUDE = -180.0;  ///< Minimum longitude value
19 static const qreal MAX_LONGITUDE = 180.0;  ///< Maximum longitude value
20
21 static const int GRID_WIDTH = 4;
22 static const int GRID_HEIGHT = 4;
23 static const int GRID_PADDING = 1;
24
25 /**
26 * \var UNDEFINED
27 * \brief Value to be used when zoom level, tile numbers or position are not defined
28 */
29 static const int UNDEFINED = -1;
30
31 #endif // COMMON_H