summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer/tile_pyramid.cpp
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2017-05-29 12:47:32 -0700
committerAnsis Brammanis <brammanis@gmail.com>2017-07-11 09:10:24 -0700
commita432a289a35815beeadc8719a963f50f8dc07bbb (patch)
tree5e1318549ed8f94d1f2cd333748fce64fe5b995b /src/mbgl/renderer/tile_pyramid.cpp
parent72f6b73590722d5451623cd21c4b1abde74e8f69 (diff)
downloadqtlocation-mapboxgl-a432a289a35815beeadc8719a963f50f8dc07bbb.tar.gz
[core] Change OverscaledTileID to also include a "wrap" value.
This prevents TilePyramid from sharing wrapped copies of tiles. This is necessary because two wrapped tiles no longer share the same CollisionTile.
Diffstat (limited to 'src/mbgl/renderer/tile_pyramid.cpp')
-rw-r--r--src/mbgl/renderer/tile_pyramid.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mbgl/renderer/tile_pyramid.cpp b/src/mbgl/renderer/tile_pyramid.cpp
index 57e7f6d375..5b1e621743 100644
--- a/src/mbgl/renderer/tile_pyramid.cpp
+++ b/src/mbgl/renderer/tile_pyramid.cpp
@@ -176,15 +176,12 @@ void TilePyramid::update(const std::vector<Immutable<style::Layer::Impl>>& layer
removeStaleTiles(retain);
for (auto& pair : tiles) {
- // TODO: Calculating yStretch based on tile distance means we can no longer use the same collision tile for two wrapped
- // copies of the same data tile. For now the assumption that we're always at "wrap = 0" means collision detection is broken
- // for wrapped tiles.
const PlacementConfig config { parameters.transformState.getAngle(),
parameters.transformState.getPitch(),
parameters.transformState.getCameraToCenterDistance(),
- parameters.transformState.getCameraToTileDistance(pair.first.unwrapTo(0)),
+ parameters.transformState.getCameraToTileDistance(pair.first.toUnwrapped()),
parameters.debugOptions & MapDebugOptions::Collision };
-
+
pair.second->setPlacementConfig(config);
}
}