diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-02-09 20:56:07 +0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-03-01 20:58:54 +0000 |
commit | 4994b3dc574443ad6e24ea1d715e0ebcdbb0f124 (patch) | |
tree | f8b61e5acc88502b740f401deb61679126b1cbd0 /test/map | |
parent | 1ce99d2d7b1921dfac1d302553160184ceac7d3e (diff) | |
download | qtlocation-mapboxgl-4994b3dc574443ad6e24ea1d715e0ebcdbb0f124.tar.gz |
[core] PrecisionPoint is now ScreenCoordinate
Diffstat (limited to 'test/map')
-rw-r--r-- | test/map/transform.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/map/transform.cpp b/test/map/transform.cpp index 1d3309e7e2..f606418826 100644 --- a/test/map/transform.cpp +++ b/test/map/transform.cpp @@ -123,19 +123,19 @@ TEST(Transform, PerspectiveProjection) { ASSERT_NEAR(-77, loc.longitude, 0.0001); ASSERT_NEAR(38, loc.latitude, 0.0001); - loc = transform.getState().pointToLatLng({ 0, 1000 }); + loc = transform.getState().screenCoordinateToLatLng({ 0, 1000 }); ASSERT_NEAR(-77.59198961199148, loc.longitude, 0.0002); ASSERT_NEAR(38.74661326302018, loc.latitude, 0.0001); - loc = transform.getState().pointToLatLng({ 1000, 0 }); + loc = transform.getState().screenCoordinateToLatLng({ 1000, 0 }); ASSERT_NEAR(-76.75823239205641, loc.longitude, 0.0001); ASSERT_NEAR(37.692872969426375, loc.latitude, 0.0001); - PrecisionPoint point = transform.getState().latLngToPoint({38.74661326302018, -77.59198961199148}); + ScreenCoordinate point = transform.getState().latLngToScreenCoordinate({38.74661326302018, -77.59198961199148}); ASSERT_NEAR(point.x, 0, 0.01); ASSERT_NEAR(point.y, 1000, 0.01); - point = transform.getState().latLngToPoint({37.692872969426375, -76.75823239205641}); + point = transform.getState().latLngToScreenCoordinate({37.692872969426375, -76.75823239205641}); ASSERT_NEAR(point.x, 1000, 0.02); ASSERT_NEAR(point.y, 0, 0.02); } @@ -193,8 +193,8 @@ TEST(Transform, Anchor) { ASSERT_DOUBLE_EQ(10, transform.getZoom()); ASSERT_DOUBLE_EQ(0, transform.getAngle()); - const PrecisionPoint anchorPoint = {0, 0}; - const LatLng anchorLatLng = transform.getState().pointToLatLng(anchorPoint); + const ScreenCoordinate anchorPoint = {0, 0}; + const LatLng anchorLatLng = transform.getState().screenCoordinateToLatLng(anchorPoint); transform.setAngle(M_PI_4, anchorPoint); ASSERT_NEAR(M_PI_4, transform.getAngle(), 0.000001); @@ -216,7 +216,7 @@ TEST(Transform, Padding) { ASSERT_DOUBLE_EQ(-100, trueCenter.longitude); ASSERT_DOUBLE_EQ(10, transform.getZoom()); - const LatLng manualShiftedCenter = transform.getState().pointToLatLng({ + const LatLng manualShiftedCenter = transform.getState().screenCoordinateToLatLng({ 1000.0 / 2.0, 1000.0 / 4.0, }); |