File indexing completed on 2025-01-05 03:59:37
0001 /* 0002 SPDX-FileCopyrightText: 2010 Jens-Michael Hoffmann <jmho@c-xx.com> 0003 0004 SPDX-FileCopyrightText: 2012 Ander Pijoan <ander.pijoan@deusto.es> 0005 0006 SPDX-License-Identifier: LGPL-2.1-or-later 0007 */ 0008 0009 #ifndef MARBLE_TILE_H 0010 #define MARBLE_TILE_H 0011 0012 #include "TileId.h" 0013 0014 namespace Marble 0015 { 0016 0017 /*! 0018 \class Tile 0019 \brief A class that resembles a tile (then it is extended to TextureTile or Vectortile). 0020 0021 A tile provides a bitmap image or vector data for a certain (geographic) area and 0022 for a given zoom level. Each Tile can be identified via a unique 0023 TileId. 0024 0025 A stack of Tiles that cover the same area and the same 0026 zoom level can be stored (and painted) layer by layer in a StackedTile object. 0027 For this purpose each Texture Tile specifies a blending type. 0028 0029 Usually the tiles are organized in so called quad tiles: This means that 0030 with increasing zoom level four other tiles cover the same area as a 0031 single "parent" tile in the previous zoom level. These four tiles have 0032 the same pixel size as the "parent" tile. 0033 0034 The process of "filling the tile with data is done in stages: The 0035 State describes the current progress of loading the data (Empty, Scaled, 0036 Expired, StateUptodate). 0037 0038 The life time cycle of a Tile can also be influenced by its 0039 expiration time which will trigger a reload of the tile data. 0040 */ 0041 0042 class Tile 0043 { 0044 public: 0045 explicit Tile( TileId const & tileId ); 0046 virtual ~Tile(); 0047 0048 /*! 0049 \brief Returns a unique ID for the tile. 0050 \return A TileId object that encodes zoom level, position and map theme. 0051 */ 0052 TileId const & id() const; 0053 0054 private: 0055 Q_DISABLE_COPY( Tile ) 0056 0057 TileId const m_id; 0058 }; 0059 0060 0061 // inline definitions 0062 0063 inline TileId const & Tile::id() const 0064 { 0065 return m_id; 0066 } 0067 0068 } 0069 0070 #endif