-
Notifications
You must be signed in to change notification settings - Fork 320
0.34.0 Migration Guide
Pablo Guardiola edited this page Apr 2, 2019
·
1 revision
- In this PR, we removed the
NavigationContract#updateCameraTrackingMode(@NavigationCamera.TrackingMode int trackingMode)and, as a result was also removed fromNavigationView.
Following you can find the new APIs added and how to use them 👀
New APIs:
NavigationCamera#update(NavigationCameraUpdate)
NavigationCamera#update(NavigationCameraUpdate, int durationMs)
NavigationCamera#update(NavigationCameraUpdate, int durationMs, Callback)
-
#setMode(CameraUpdateMode)- determines behavior with tracking
-
DEFAULT- if tracking or resetting, provided animation will be ignored -
OVERRIDE- if tracking or retting,LocationComponentwill be set to trackingNONEand animation will fire
NavigationCamera camera = ...;
camera.updateCameraTrackingMode(NAVIGATION_TRACKING_MODE_GPS);
CameraUpdate cameraUpdate = ...;
NavigationCameraUpdate navCameraUpdate = new NavigationCameraUpdate(cameraUpdate);
navCameraUpdate.setMode(CameraUpdateMode.DEFAULT);
camera.update(navCameraUpdate); // Ignored
camera.updateCameraTrackingMode(NAVIGATION_TRACKING_MODE_NONE);
camera.update(navCameraUpdate); // Fires animation
camera.updateCameraTrackingMode(NAVIGATION_TRACKING_MODE_GPS);
navCameraUpdate.setMode(CameraUpdateMode.OVERRIDE);
camera.update(navCameraUpdate); // Fires animation