[core] Include bucket name in queryRenderedSymbols duplicate feature filter

- Port of GL JS PR #5703
 - Fixes issue #10616
This commit is contained in:
Chris Loer
2017-12-11 14:36:27 -08:00
committed by Chris Loer
parent 78545723fe
commit 3fed2358d6
2 changed files with 2 additions and 3 deletions

View File

@@ -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",

View File

@@ -303,13 +303,13 @@ std::vector<IndexedSubfeature> CollisionIndex::queryRenderedSymbols(const Geomet
}
}
std::unordered_map<std::string, std::unordered_set<std::size_t>> sourceLayerFeatures;
std::unordered_map<std::string, std::unordered_map<std::string, std::unordered_set<std::size_t>>> 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;