CameraStateTransition
public protocol CameraStateTransition : AnyObject
Protocol, which is used to execute camera related transitions, based on data provided
via CameraOptions in ViewportDataSource.
By default Navigation SDK for iOS provides default implementation of CameraStateTransition
in NavigationCameraStateTransition.
-
Initializer of
NavigationViewportDataSourceobject.Declaration
Swift
init(_ mapView: MapView)Parameters
mapViewMapViewobject, on instance of which camera related transitions will be performed. -
Method, which performs camera transition to the
NavigationCameraState.followingstate.Declaration
Swift
func transitionToFollowing(_ cameraOptions: CameraOptions, completion: @escaping (() -> Void))Parameters
cameraOptionsInstance of
CameraOptions, which describes viewpoint of theMapView.completionCompletion handler, which is called after performing transition.
-
Method, which performs camera transition to the
NavigationCameraState.overviewstate.Declaration
Swift
func transitionToOverview(_ cameraOptions: CameraOptions, completion: @escaping (() -> Void))Parameters
cameraOptionsInstance of
CameraOptions, which describes viewpoint of theMapView.completionCompletion handler, which is called after performing transition.
-
Method, which performs camera update, when already in the
NavigationCameraState.overviewstate orNavigationCameraState.followingstate.Declaration
Swift
func update(to cameraOptions: CameraOptions, state: NavigationCameraState)Parameters
cameraOptionsInstance of
CameraOptions, which describes viewpoint of theMapView.stateInstance of
NavigationCameraState, which describes the current state ofNavigationCamera. -
Method, which cancels current transition.
Declaration
Swift
func cancelPendingTransition()
Install in Dash
CameraStateTransition Protocol Reference