summaryrefslogtreecommitdiff
path: root/test/api
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-12-22 16:27:31 +0100
committerKonstantin Käfer <mail@kkaefer.com>2017-12-22 16:27:31 +0100
commit303e27f10514edfce1f9dfcd063fe3b1363afb61 (patch)
tree0363cfb6772ecd4cb6acdc39a66e8574269ac782 /test/api
parent28a21f3b0bb118224dcbe87b017ce74b7a7fab11 (diff)
downloadqtlocation-mapboxgl-303e27f10514edfce1f9dfcd063fe3b1363afb61.tar.gz
[core] don't tie Annotation geometries to Map maxzoomupstream/annotations-maxzoom-crash
Instead, geometry generation via GeoJSONVT is now bound to the hardcoded limit of the annotation tile source.
Diffstat (limited to 'test/api')
-rw-r--r--test/api/annotations.test.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/api/annotations.test.cpp b/test/api/annotations.test.cpp
index d5e76fc21e..07257851ac 100644
--- a/test/api/annotations.test.cpp
+++ b/test/api/annotations.test.cpp
@@ -459,3 +459,19 @@ TEST(Annotations, DebugSparse) {
test.checkRendering("debug_sparse");
}
+
+TEST(Annotations, ChangeMaxZoom) {
+ AnnotationTest test;
+
+ LineString<double> line = {{ { 0, 0 }, { 45, 45 }, { 30, 0 } }};
+ LineAnnotation annotation { line };
+ annotation.color = Color::red();
+ annotation.width = { 5 };
+
+ test.map.setMaxZoom(6);
+ test.map.getStyle().loadJSON(util::read_file("test/fixtures/api/empty.json"));
+ test.map.addAnnotation(annotation);
+ test.map.setMaxZoom(14);
+ test.map.setZoom(test.map.getMaxZoom());
+ test.checkRendering("line_annotation_max_zoom");
+}