2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Sami Rämö - sami.ramo@ixonos.com
6 Jussi Laitinen - jussi.laitinen@ixonos.com
8 Situare is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 version 2 as published by the Free Software Foundation.
12 Situare is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with Situare; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
30 const int MAP_TILE_MIN_INDEX = 0; ///< First index number of map tiles
32 const int MAP_VIEW_MIN_ZOOM_LEVEL = 2; ///< Minimum zoom level for MapView
35 * @var MAP_SCENE_MIN_NORMAL_LEVEL
36 * @brief Used for shifting zValues of MapTiles
38 const int MAP_SCENE_MIN_NORMAL_LEVEL = OSM_MAX_ZOOM_LEVEL + 1;
40 const double MAP_SCENE_VERTICAL_OVERSIZE_FACTOR = 0.5; ///< MapScene vertical oversize ( * map size)
43 * @var MAP_SCENE_MIN_PIXEL_X
44 * @brief First scene horizontal pixel
46 const int MAP_SCENE_MIN_PIXEL_X = -OMS_MAP_PIXELS_X * MAP_SCENE_VERTICAL_OVERSIZE_FACTOR;
49 * @var MAP_SCENE_MAX_PIXEL_X
50 * @brief Last scene horizontal pixel
52 const int MAP_SCENE_MAX_PIXEL_X = OMS_MAP_PIXELS_X * (1 + MAP_SCENE_VERTICAL_OVERSIZE_FACTOR) - 1;
54 ////////////////////////////////////////////////////////////////////////////////
56 ////////////////////////////////////////////////////////////////////////////////
58 * @var MAP_DEFAULT_ZOOM_LEVEL
59 * @brief Maps Default zoom level, used when latest zoom level is not available.
61 const int MAP_DEFAULT_ZOOM_LEVEL = MAP_VIEW_MIN_ZOOM_LEVEL;
63 const qreal MAP_DEFAULT_LONGITUDE = 0.0000; ///< Default longitude value
64 const qreal MAP_DEFAULT_LATITUDE = 0.0000; ///< Default latitude value
67 * @var FRIEND_LOCATION_ICON_Z_LEVEL
68 * @brief layer of friend location icon
70 const int FRIEND_LOCATION_ICON_Z_LEVEL = MAP_SCENE_MIN_NORMAL_LEVEL + OSM_MAX_ZOOM_LEVEL + 1;
72 const int GROUP_ITEM_FRIENDS_COUNT_X = 13; ///< Group item friends count x value
73 const int GROUP_ITEM_FRIENDS_COUNT_Y = 13; ///< Group item friends count y value
74 const int GROUP_ITEM_FRIENDS_COUNT_WIDTH = 17; ///< Group item friends count width value
75 const int GROUP_ITEM_FRIENDS_COUNT_HEIGHT = 17; ///< Group item friends count height value
77 const int PRESS_MANHATTAN_LENGTH = 30; ///< Friend/group item press manhattan length
80 * @var OWN_LOCATION_ICON_Z_LEVEL
81 * @brief layer of own location icon
83 const int OWN_LOCATION_ICON_Z_LEVEL = FRIEND_LOCATION_ICON_Z_LEVEL + 1;
85 const double MIN_LONGITUDE = -180.0; ///< Minimum longitude value
86 const double MAX_LONGITUDE = 180.0; ///< Maximum longitude value
88 const qreal EARTH_RADIUS = 6371.01; ///< Earth radius in km
90 const int MAP_GRID_PADDING = 0; ///< Grid padding used in tile grid calculation
92 const QString OSM_LICENSE = QString::fromUtf8("© OpenStreetMap contributors, CC-BY-SA");
94 const int AUTO_CENTERING_DISABLE_DISTANCE = 100; ///< Distance in pixels
96 //String constants for storing map settings:
97 const QString MAP_LAST_ZOOMLEVEL = "LAST_MAP_ZOOM_LEVEL"; ///< Maps last zoom level before logout
98 const QString MAP_LAST_POSITION = "LAST_MAP_LOCATION"; ///< Maps last postion before logout
100 * @var ERROR_VALUE_NOT_FOUND_ON_SETTINGS
101 * @brief Error string that program will get if value is not found on settings
103 const QString ERROR_VALUE_NOT_FOUND_ON_SETTINGS = "Value_not_found";
107 * @brief Value to be used when zoom level, tile numbers or position are not defined
109 const int UNDEFINED = INT_MIN;
111 #endif // MAPCOMMON_H