Added mapcommon.h.
authorJussi Laitinen <jupe@l3l7588.ixonos.local>
Thu, 15 Apr 2010 12:28:27 +0000 (15:28 +0300)
committerJussi Laitinen <jupe@l3l7588.ixonos.local>
Thu, 15 Apr 2010 12:28:27 +0000 (15:28 +0300)
src/map/mapcommon.h [new file with mode: 0644]

diff --git a/src/map/mapcommon.h b/src/map/mapcommon.h
new file mode 100644 (file)
index 0000000..dcd3399
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef COMMON_H
+#define COMMON_H
+
+#include <QtCore>
+
+static const int TILE_SIZE_X = 256; ///< Tile image size in x direction
+static const int TILE_SIZE_Y = 256; ///< Tile image size in y direction
+
+static const int MIN_MAP_ZOOM_LEVEL = 0; ///< Minimum zoom level
+static const int MAX_MAP_ZOOM_LEVEL = 18; ///< Maximum zoom level
+static const int MIN_MAP_SCENE_NORMAL_LEVEL = MAX_MAP_ZOOM_LEVEL + 1;
+
+static const int ZOOM_FPS = 30; ///< FPS for the zoom effect
+static const qreal ZOOM_TIME = 0.25; ///< Length of the zoom effect (seconds)
+
+static const qreal MIN_LATITUDE = -85.0511; ///< Minimum latitude value
+static const qreal MAX_LATITUDE = 85.0511;  ///< Maximum latitude value
+static const qreal MIN_LONGITUDE = -180.0;  ///< Minimum longitude value
+static const qreal MAX_LONGITUDE = 180.0;  ///< Maximum longitude value
+
+static const int GRID_WIDTH = 4;
+static const int GRID_HEIGHT = 4;
+static const int GRID_PADDING = 1;
+
+/**
+* \var UNDEFINED
+* \brief Value to be used when zoom level, tile numbers or position are not defined
+*/
+static const int UNDEFINED = -1;
+
+#endif // COMMON_H