blob: c6a098ceb74a84d01ce95815b8031c5ba123a392 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#pragma once
#include "drape_frontend/tile_key.hpp"
#include "std/function.hpp"
namespace df
{
using TTilesCollection = set<TileKey>;
struct CoverageResult
{
int m_minTileX = 0;
int m_maxTileX = 0;
int m_minTileY = 0;
int m_maxTileY = 0;
};
/// This function determines the tiles coverage in specified zoom level.
/// Each tile can be processed in processTile callback.
CoverageResult CalcTilesCoverage(m2::RectD const & rect, int targetZoom,
function<void(int, int)> const & processTile);
/// This function checks if tileKey1 and tileKey2 are neighbours
bool IsNeighbours(TileKey const & tileKey1, TileKey const & tileKey2);
/// This function performs clipping by maximum zoom label available for map data.
int ClipTileZoomByMaxDataZoom(int zoom);
/// This function returns tile key by point on specific zoom level.
TileKey GetTileKeyByPoint(m2::PointD const & pt, int zoom);
} // namespace df
|