From 06ccbb5c65a650e811c07139c68824af7c2b42c6 Mon Sep 17 00:00:00 2001 From: Chris Loer Date: Mon, 11 Dec 2017 14:36:27 -0800 Subject: [core] Include bucket name in queryRenderedSymbols duplicate feature filter - Port of GL JS PR #5703 - Fixes issue #10616 --- platform/node/test/ignores.json | 1 - src/mbgl/text/collision_index.cpp | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/platform/node/test/ignores.json b/platform/node/test/ignores.json index b55ef3f6da..d0870904b2 100644 --- a/platform/node/test/ignores.json +++ b/platform/node/test/ignores.json @@ -9,7 +9,6 @@ "query-tests/geometry/multilinestring": "needs investigation", "query-tests/geometry/multipolygon": "needs investigation", "query-tests/geometry/polygon": "needs investigation", - "query-tests/regressions/mapbox-gl-js#5172": "https://github.com/mapbox/mapbox-gl-native/issues/10616", "query-tests/symbol/panned-after-insert": "https://github.com/mapbox/mapbox-gl-native/issues/10408", "query-tests/symbol/rotated-after-insert": "https://github.com/mapbox/mapbox-gl-native/issues/10408", "query-tests/world-wrapping/box": "skip - needs issue", diff --git a/src/mbgl/text/collision_index.cpp b/src/mbgl/text/collision_index.cpp index fee28b5873..8014efe6c7 100644 --- a/src/mbgl/text/collision_index.cpp +++ b/src/mbgl/text/collision_index.cpp @@ -303,13 +303,13 @@ std::vector CollisionIndex::queryRenderedSymbols(const Geomet } } - std::unordered_map> sourceLayerFeatures; + std::unordered_map>> sourceLayerFeatures; for (auto& queryResult : thisTileFeatures) { auto& feature = queryResult.first; auto& bbox = queryResult.second; // Skip already seen features. - auto& seenFeatures = sourceLayerFeatures[feature.sourceLayerName]; + auto& seenFeatures = sourceLayerFeatures[feature.sourceLayerName][feature.bucketName]; if (seenFeatures.find(feature.index) != seenFeatures.end()) continue; -- cgit v1.2.1