diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-04-13 23:46:19 +0300 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-04-14 12:52:20 -0700 |
commit | 09a22715769c629ad433b405908b60e1b9fa969b (patch) | |
tree | ed4851f872f97de32fe38578d6c7b1c4bac5bb01 /test/map/map.test.cpp | |
parent | 98e2e59e5e963dbc5451a19233d942b429a74855 (diff) | |
download | qtlocation-mapboxgl-09a22715769c629ad433b405908b60e1b9fa969b.tar.gz |
[core] Ignore shortest path in Map::pixelForLatLng
Diffstat (limited to 'test/map/map.test.cpp')
-rw-r--r-- | test/map/map.test.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/map/map.test.cpp b/test/map/map.test.cpp index b732741efd..f563aaa548 100644 --- a/test/map/map.test.cpp +++ b/test/map/map.test.cpp @@ -69,6 +69,18 @@ TEST(Map, LatLngBehavior) { ASSERT_DOUBLE_EQ(latLng1.longitude(), latLng2.longitude()); } +TEST(Map, LatLngBoundsToCamera) { + MapTest test; + Map map(test.backend, test.view.getSize(), 1, test.fileSource, test.threadPool, MapMode::Still); + + map.setLatLngZoom({ 40.712730, -74.005953 }, 16.0); + + LatLngBounds bounds = LatLngBounds::hull({15.68169,73.499857}, {53.560711, 134.77281}); + + CameraOptions virtualCamera = map.cameraForLatLngBounds(bounds, {}); + ASSERT_TRUE(bounds.contains(*virtualCamera.center)); +} + TEST(Map, CameraToLatLngBounds) { MapTest test; Map map(test.backend, test.view.getSize(), 1, test.fileSource, test.threadPool, MapMode::Still); |