summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2018-04-02 17:41:09 -0700
committerAnsis Brammanis <ansis.brammanis@gmail.com>2018-04-26 18:03:17 -0400
commitf7d20a587199ccee42469ecea2299ae73bfaae49 (patch)
tree19da41f7b8c867aeb860d9aab650773337ef1257 /src/mbgl/renderer
parent0767bf06869c380305c57df1b69d74fac5a6c94a (diff)
downloadqtlocation-mapboxgl-f7d20a587199ccee42469ecea2299ae73bfaae49.tar.gz
[core] fix querying circles across tile boundaries
Diffstat (limited to 'src/mbgl/renderer')
-rw-r--r--src/mbgl/renderer/tile_pyramid.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mbgl/renderer/tile_pyramid.cpp b/src/mbgl/renderer/tile_pyramid.cpp
index e2d4d9829f..b2d72680e7 100644
--- a/src/mbgl/renderer/tile_pyramid.cpp
+++ b/src/mbgl/renderer/tile_pyramid.cpp
@@ -264,13 +264,15 @@ std::unordered_map<std::string, std::vector<Feature>> TilePyramid::queryRendered
});
for (const RenderTile& renderTile : sortedTiles) {
+ auto queryPadding = renderTile.tile.getQueryPadding(layers);
+
GeometryCoordinate tileSpaceBoundsMin = TileCoordinate::toGeometryCoordinate(renderTile.id, box.min);
- if (tileSpaceBoundsMin.x >= util::EXTENT || tileSpaceBoundsMin.y >= util::EXTENT) {
+ if (tileSpaceBoundsMin.x - queryPadding >= util::EXTENT || tileSpaceBoundsMin.y - queryPadding >= util::EXTENT) {
continue;
}
GeometryCoordinate tileSpaceBoundsMax = TileCoordinate::toGeometryCoordinate(renderTile.id, box.max);
- if (tileSpaceBoundsMax.x < 0 || tileSpaceBoundsMax.y < 0) {
+ if (tileSpaceBoundsMax.x + queryPadding < 0 || tileSpaceBoundsMax.y + queryPadding < 0) {
continue;
}