NavigationViewportDataSource
public class NavigationViewportDataSource : ViewportDataSource
extension NavigationViewportDataSource: LocationConsumer
Class, which conforms to ViewportDataSource
protocol and provides default implementation of it.
-
Delegate, which is used to notify
NavigationCamera
regarding upcomingCameraOptions
related changes.Declaration
Swift
public weak var delegate: ViewportDataSourceDelegate?
-
CameraOptions
, which are used on iOS when transitioning toNavigationCameraState.following
or for continuous updates when already inNavigationCameraState.following
state.Declaration
Swift
public var followingMobileCamera: CameraOptions
-
CameraOptions
, which are used on CarPlay when transitioning toNavigationCameraState.following
or for continuous updates when already inNavigationCameraState.following
state.Declaration
Swift
public var followingCarPlayCamera: CameraOptions
-
CameraOptions
, which are used on iOS when transitioning toNavigationCameraState.overview
or for continuous updates when already inNavigationCameraState.overview
state.Declaration
Swift
public var overviewMobileCamera: CameraOptions
-
CameraOptions
, which are used on CarPlay when transitioning toNavigationCameraState.overview
or for continuous updates when already inNavigationCameraState.overview
state.Declaration
Swift
public var overviewCarPlayCamera: CameraOptions
-
Options, which give the ability to control whether certain
CameraOptions
will be generated byNavigationViewportDataSource
or can be provided by user directly.Declaration
Swift
public var options: NavigationViewportDataSourceOptions
-
Initializer of
NavigationViewportDataSource
object.Declaration
Swift
public required init(_ mapView: MapView, viewportDataSourceType: ViewportDataSourceType = .passive)
Parameters
mapView
Instance of
MapView
, which is going to be used for several operations, which includes (but not limited to) subscription to raw location updates viaLocationConsumer
(in case ifviewportDataSourceType
was set to.raw
).MapView
will be weakly stored byNavigationViewportDataSource
.viewportDataSourceType
Type of locations, which will be used to prepare
CameraOptions
.
-
Declaration
Swift
public func locationUpdate(newLocation: Location)