[core] Skip duplicated IDs when querying point annotations

This commit is contained in:
Bruno de Oliveira Abinader
2016-10-12 09:54:25 +03:00
parent 0fc7fd11d9
commit 436a22efe9
2 changed files with 15 additions and 3 deletions

View File

@@ -43,9 +43,19 @@ TEST(Annotations, SymbolAnnotation) {
test.map.addAnnotation(SymbolAnnotation { Point<double>(0, 0), "default_marker" });
test.checkRendering("point_annotation");
auto size = test.view.getSize();
auto screenBox = ScreenBox { {}, { double(size[0]), double(size[1]) } };
auto features = test.map.queryPointAnnotations(screenBox);
EXPECT_EQ(features.size(), 1u);
test.map.setZoom(test.map.getMaxZoom());
// FIXME: https://github.com/mapbox/mapbox-gl-native/issues/5419
//test.map.setZoom(test.map.getMaxZoom());
//test.checkRendering("point_annotation");
test::render(test.map);
features = test.map.queryPointAnnotations(screenBox);
EXPECT_EQ(features.size(), 1u);
}
TEST(Annotations, LineAnnotation) {