[core] Restored shape annotation z-order

Shapes are once again always added to the top z-index.

Fixes #5691.
This commit is contained in:
Minh Nguyễn
2016-07-16 14:19:14 -07:00
committed by Minh Nguyễn
parent da35ef9f49
commit 74fe96d261
5 changed files with 21 additions and 2 deletions

View File

@@ -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;