summaryrefslogtreecommitdiff
path: root/test/api
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.deoliveira@mapbox.com>2019-03-08 12:43:05 +0200
committerAnder Conselvan de Oliveira <ander.deoliveira@mapbox.com>2019-03-14 18:33:11 +0200
commit57334407473a31ff43baa645dafd2f5e1bd910fb (patch)
treee981f87c0040799a1ebc45f86d05b3ece6916aba /test/api
parent11de777628e9e2c4b219bae3f1a6eabd86f2a3c5 (diff)
downloadqtlocation-mapboxgl-57334407473a31ff43baa645dafd2f5e1bd910fb.tar.gz
[core] Group Map LatLngBounds, min and max zoom methods
Group bounds, minimum and maximum zoom related methods together using the new BoundOptions. v2: Document that getBounds() initializes all optional fields. - Add test for getBounds() on a map with default values.
Diffstat (limited to 'test/api')
-rw-r--r--test/api/annotations.test.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/api/annotations.test.cpp b/test/api/annotations.test.cpp
index 89ce357d84..aad85f8d57 100644
--- a/test/api/annotations.test.cpp
+++ b/test/api/annotations.test.cpp
@@ -85,7 +85,7 @@ TEST(Annotations, LineAnnotation) {
test.map.addAnnotation(annotation);
test.checkRendering("line_annotation");
- test.map.jumpTo(CameraOptions().withZoom(test.map.getMaxZoom()));
+ test.map.jumpTo(CameraOptions().withZoom(*test.map.getBounds().maxZoom));
test.checkRendering("line_annotation_max_zoom");
}
@@ -100,7 +100,7 @@ TEST(Annotations, FillAnnotation) {
test.map.addAnnotation(annotation);
test.checkRendering("fill_annotation");
- test.map.jumpTo(CameraOptions().withZoom(test.map.getMaxZoom()));
+ test.map.jumpTo(CameraOptions().withZoom(*test.map.getBounds().maxZoom));
test.checkRendering("fill_annotation_max_zoom");
}
@@ -481,11 +481,11 @@ TEST(Annotations, ChangeMaxZoom) {
annotation.color = Color::red();
annotation.width = { 5 };
- test.map.setMaxZoom(6);
+ test.map.setBounds(BoundOptions().withMaxZoom(6));
test.map.getStyle().loadJSON(util::read_file("test/fixtures/api/empty.json"));
test.map.addAnnotation(annotation);
- test.map.setMaxZoom(14);
- test.map.jumpTo(CameraOptions().withZoom(test.map.getMaxZoom()));
+ test.map.setBounds(BoundOptions().withMaxZoom(14));
+ test.map.jumpTo(CameraOptions().withZoom(*test.map.getBounds().maxZoom));
test.checkRendering("line_annotation_max_zoom");
}