summaryrefslogtreecommitdiff
path: root/src/mbgl/util/tile_cover.hpp
blob: 405e6a48e6b3e8cd90fa446a0c2e297212883ed4 (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
#pragma once

#include <mbgl/tile/tile_id.hpp>
#include <mbgl/style/types.hpp>
#include <mbgl/util/tile_coordinate.hpp>

#include <vector>

namespace mbgl {

class TransformState;
class LatLngBounds;

namespace util {

int32_t coveringZoomLevel(double z, SourceType type, uint16_t tileSize);

std::vector<UnwrappedTileID> tileCover(const TransformState&, int32_t z);
std::vector<UnwrappedTileID> tileCover(const LatLngBounds&, int32_t z);

// Compute only the count of tiles needed for tileCover
unsigned long tileCount(const LatLngBounds&, uint8_t z, uint16_t tileSize);

} // namespace util
} // namespace mbgl