summaryrefslogtreecommitdiff
path: root/test/api
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-07-16 14:19:14 -0700
committerMinh Nguyễn <mxn@1ec5.org>2016-07-18 14:43:44 -0700
commit74fe96d2617f870206ff358d7dfcafccf4e109bc (patch)
treed47bf21a14a6bd5625f6fac416591e11f50c0675 /test/api
parentda35ef9f49139f4dfc7eb5ea2a04f800e895a65f (diff)
downloadqtlocation-mapboxgl-74fe96d2617f870206ff358d7dfcafccf4e109bc.tar.gz
[core] Restored shape annotation z-order
Shapes are once again always added to the top z-index. Fixes #5691.
Diffstat (limited to 'test/api')
-rw-r--r--test/api/annotations.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/api/annotations.cpp b/test/api/annotations.cpp
index 253e6995f3..a1e67b29c4 100644
--- a/test/api/annotations.cpp
+++ b/test/api/annotations.cpp
@@ -79,6 +79,21 @@ TEST(Annotations, FillAnnotation) {
test.checkRendering("fill_annotation_max_zoom");
}
+TEST(Annotations, OverlappingFillAnnotation) {
+ AnnotationTest test;
+
+ Polygon<double> polygon = {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }};
+ FillAnnotation underlaidAnnotation { polygon };
+ underlaidAnnotation.color = { { 0, 255, 0, 1 } };
+ FillAnnotation overlaidAnnotation { polygon };
+ overlaidAnnotation.color = { { 255, 0, 0, 1 } };
+
+ test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
+ test.map.addAnnotation(underlaidAnnotation);
+ test.map.addAnnotation(overlaidAnnotation);
+ test.checkRendering("overlapping_fill_annotation");
+}
+
TEST(Annotations, StyleSourcedShapeAnnotation) {
AnnotationTest test;