Marble

TileLoaderHelper.h
1 /*
2  SPDX-FileCopyrightText: 2005-2007 Torsten Rahn <[email protected]>
3  SPDX-FileCopyrightText: 2007 Inge Wallin <[email protected]>
4  SPDX-FileCopyrightText: 2008 Patrick Spendrin <[email protected]>
5  SPDX-FileCopyrightText: 2008 Jens-Michael Hoffmann <[email protected]>
6 
7  SPDX-License-Identifier: LGPL-2.0-or-later
8 */
9 
10 #ifndef MARBLE_TILELOADERHELPER_H
11 #define MARBLE_TILELOADERHELPER_H
12 
13 #include "marble_export.h"
14 
15 namespace Marble
16 {
17 
18 namespace TileLoaderHelper
19 {
20  /**
21  * @brief Get the maximum number of tile rows for a given tile level.
22  * @param levelZeroRows the number of rows in level zero
23  * @param level the tile level
24  * @return the maximum number of rows that a map level was tiled into.
25  * If the tile level number is invalid then "-1" gets
26  * returned so this case of wrong input data can get caught
27  * by the code which makes use of it.
28  */
29  MARBLE_EXPORT int levelToRow( int levelZeroRows, int level );
30 
31  /**
32  * @brief Get the maximum number of tile columns for a given tile level.
33  * @param levelZeroColumns the number of columns in level zero
34  * @param level the tile level
35  * @return the maximum number of columns that a map level was tiled into.
36  * If the tile level number is invalid then "-1" gets
37  * returned so this case of wrong input data can get caught
38  * by the code which makes use of it.
39  */
40  MARBLE_EXPORT int levelToColumn( int levelZeroColumns, int level );
41 
42  /**
43  * @brief Get the tile level for the given maximum number of tile columns.
44  * @param levelZeroRows the number of rows in level zero
45  * @param row the maximum number of rows that a map level was tiled into.
46  * @return the corresponding tile level.
47  * If the number of rows is invalid then "-1" gets
48  * returned so this case of wrong input data can get caught
49  * by the code which makes use of it.
50  */
51  MARBLE_EXPORT int rowToLevel( int levelZeroRows, int row );
52 
53  /**
54  * @brief Get the tile level for the given maximum number of tile columns.
55  * @param levelZeroColumns the number of columns in level zero
56  * @param column the maximum number of columns that a map level was tiled into.
57  * @return the corresponding tile level.
58  * If the number of columns is invalid then "-1" gets
59  * returned so this case of wrong input data can get caught
60  * by the code which makes use of it.
61  */
62  MARBLE_EXPORT int columnToLevel( int levelZeroColumns, int column );
63 }
64 
65 }
66 
67 #endif // MARBLE_TILELOADERHELPER_H
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Sep 25 2023 03:50:20 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.