2 * Copyright (C) 2013 HERE Global B.V. All rights reserved.
3 * This software, including documentation, is protected by copyright controlled by
4 * HERE Global B.V. (“Software”). All rights are reserved. Copying, including reproducing,
5 * storing, adapting or translating, any or all of this material requires the prior
6 * written consent of HERE Global B.V. You may use this
7 * Software in accordance with the terms and conditions defined in the
8 * HERE Location Platform Services Terms and Conditions, available at
9 * http://developer.here.com/terms-conditions-base
11 * As an additional permission to the above, you may distribute Software,
12 * in object code format as part of an Application, according to, and subject to, terms and
13 * conditions defined in the Tizen Software Development kit (“SDK”) License Agreement.
14 * You may distribute such object code format Application under terms of your choice,
15 * provided that the header and source files of the Software have not been modified.
21 #include "common/HereMaps_global.h"
22 #include "maps/GeoTiledMap.h"
24 HERE_MAPS_BEGIN_NAMESPACE
27 * This class encapsulates information that identifies a map tile in a grid
28 * reflecting the normalized Mercator projection. The projection represents the
29 * surface of the globe as a set of squares. The size of the grid depends on the
30 * map zoom level. At the lowest zoom level, the entire globe is
31 * shown in one square, which means that the tile grid consists of one row and
32 * one column. At the next higher zoom level, the tile grid contains two rows
33 * and two columns per row, at the next, four rows and four columns per row, and
34 * so on -- in other words, the number of rows and columns doubles at each
41 * This is a constructor. It initializes a new instance of the tile key with
42 * the zoom level and the x and y coordinates of the tile at that zoom level.
44 * @param aLevel A value indicating the zoom level.
46 * @param aX A value indicating the x coordinate in the map tile grid.
48 * @param aY A value indicating the y coordinate in the map tile grid.
50 * @param aMapLanguage A value indicating the map language.
52 * @param aMapLanguage A value indicating the map type.
57 String sMapLanguage = String("eng"),
58 GeoTiledMap::MapType aMapType = GeoTiledMap::MT_Normal_Day)
63 m_sMapLanguage = sMapLanguage;
64 m_aMapType = aMapType;
68 * This method is a copy constructor.
70 * @param rRhs A constant reference to an object whose contents are to be
71 * copied into the present instance.
73 TileKey(const TileKey& rRhs)
79 * This method retrieves a tile hash value based on the tile key properties.
81 * @return An integer value representing the tile hash.
85 int hashValue = (((int)m_aMapType) << 25) +
93 * This is an equality operator.
95 * @param rRhs A constant reference to an object that is to be compared to
96 * the present instance.
98 * @return <code>true</code> if the given instance and the right-hand object
99 * are identical, otherwise <code>false</code>.
101 bool operator == (const TileKey& rRhs) const
103 return m_aLevel == rRhs.m_aLevel &&
106 m_sMapLanguage == rRhs.m_sMapLanguage &&
107 m_aMapType == rRhs.m_aMapType;
111 * This is an assignment operator.
113 * @param rRhs A constant reference to an object whose contents are to be
114 * copied into the present instance.
116 * @return A reference to the given instance of the class after the assignment.
118 TileKey& operator = (const TileKey& rRhs)
122 m_aLevel = rRhs.m_aLevel;
125 m_sMapLanguage = rRhs.m_sMapLanguage;
126 m_aMapType = rRhs.m_aMapType;
132 * This member variable holds a value indicating the tile zoom level.
137 * This member variable holds a value indicating the x coordinate of the tile.
142 * This member variable holds a value indicating the y coordinate of the tile.
147 * This member variable holds a value indicating the map language.
149 String m_sMapLanguage;
152 * This member variable holds a value indicating the map type.
154 GeoTiledMap::MapType m_aMapType;
157 HERE_MAPS_END_NAMESPACE