diff options
author | Chris Loer <chris.loer@gmail.com> | 2017-12-11 14:36:27 -0800 |
---|---|---|
committer | Chris Loer <chris.loer@gmail.com> | 2017-12-11 14:36:27 -0800 |
commit | 06ccbb5c65a650e811c07139c68824af7c2b42c6 (patch) | |
tree | 89a9f01f0af92a0ca75bca942f4589f6402180d6 | |
parent | 78545723fea953417e3de188e76cf92e8b6a67e4 (diff) | |
download | qtlocation-mapboxgl-06ccbb5c65a650e811c07139c68824af7c2b42c6.tar.gz |
[core] Include bucket name in queryRenderedSymbols duplicate feature filterupstream/cloer_10616
- Port of GL JS PR #5703
- Fixes issue #10616
-rw-r--r-- | platform/node/test/ignores.json | 1 | ||||
-rw-r--r-- | 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<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; |