[core] Include bucket name in queryRenderedSymbols duplicate feature filter
- Port of GL JS PR #5703 - Fixes issue #10616
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user