diff options
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/LocationComponentTest.kt')
-rw-r--r-- | platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/LocationComponentTest.kt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/LocationComponentTest.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/LocationComponentTest.kt index 444b478219..41e67ca31b 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/LocationComponentTest.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/LocationComponentTest.kt @@ -1106,12 +1106,15 @@ class LocationComponentTest : BaseActivityTest() { uiController: UiController, context: Context) { component.activateLocationComponent(context, false) component.isLocationComponentEnabled = true - val target = LatLng(51.0, 17.0) - assertTrue(target.distanceTo(LatLng(location)) > LocationComponentConstants.INSTANT_LOCATION_TRANSITION_THRESHOLD) component.cameraMode = CameraMode.NONE component.forceLocationUpdate(location) + + val target = LatLng(51.0, 17.0) mapboxMap.moveCamera(CameraUpdateFactory.newLatLng(target)) + mapboxMap.moveCamera(CameraUpdateFactory.zoomTo(15.0)) mapboxMap.moveCamera(CameraUpdateFactory.bearingTo(90.0)) + assertTrue(Utils.immediateAnimation(mapboxMap.projection, mapboxMap.cameraPosition.target, LatLng(location))) + component.cameraMode = CameraMode.TRACKING_GPS assertEquals(location.bearing.toDouble(), mapboxMap.cameraPosition.bearing, 0.1) assertEquals(location.latitude, mapboxMap.cameraPosition.target.latitude, 0.1) |