[core] Ignore shortest path in Map::pixelForLatLng

This commit is contained in:
Bruno de Oliveira Abinader
2017-04-13 23:46:19 +03:00
committed by John Firebaugh
parent 98e2e59e5e
commit 09a2271576
4 changed files with 61 additions and 32 deletions

View File

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