From ac32b41493956e6b03ab13475f27a4dcd64355ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Fri, 22 Dec 2017 16:27:31 +0100 Subject: [core] don't tie Annotation geometries to Map maxzoom Instead, geometry generation via GeoJSONVT is now bound to the hardcoded limit of the annotation tile source. --- test/api/annotations.test.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test') 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 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"); +} -- cgit v1.2.1