diff options
author | Aleksandar Stojiljkovic <aleksandar.stojiljkovic@mapbox.com> | 2019-08-05 18:16:26 +0300 |
---|---|---|
committer | Aleksandar Stojiljkovic <aleksandar.stojiljkovic@mapbox.com> | 2019-08-05 20:40:30 +0300 |
commit | 667a08f6fc19e7b9ca679298ad33f1986e93efd9 (patch) | |
tree | d8791213177cd5bb02d1852b425581702b17de8f /src/mbgl/util/tile_cover.cpp | |
parent | b12889539e9e92a48360e536d11abf95b6513690 (diff) | |
download | qtlocation-mapboxgl-667a08f6fc19e7b9ca679298ad33f1986e93efd9.tar.gz |
[core] Tile cover LOD: lod covers single level tile coverupstream/astojilj-lod
Unit test verifies that, with different camera parameters combinations LOD tile cover covers all tiles returned by single level tileCover.
Diffstat (limited to 'src/mbgl/util/tile_cover.cpp')
-rw-r--r-- | src/mbgl/util/tile_cover.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mbgl/util/tile_cover.cpp b/src/mbgl/util/tile_cover.cpp index 11e1a97f4c..32e76c4214 100644 --- a/src/mbgl/util/tile_cover.cpp +++ b/src/mbgl/util/tile_cover.cpp @@ -181,6 +181,9 @@ std::vector<UnwrappedTileID> tileCoverWithLOD(const TransformState& state, int32 const auto offset = state.getCenterOffset(); constexpr double zoomDiff = 1.0; + // Explanation on 0.55: mathematically, it is 0.5 used in calculation of + // the next LOD. 0.55 is chosen to avoid using LOD for less than 60 degrees + // pitch. constexpr double coefLOD[] = { 0.55 * zoomDiff / (zoomDiff + 1), 0.55 * (zoomDiff + 1) / (zoomDiff + 2), |