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
NavigationCameraregarding upcomingCameraOptionsrelated changes.Declaration
Swift
public var delegate: ViewportDataSourceDelegate? -
CameraOptions, which are used on iOS when transitioning toNavigationCameraState.followingor for continuous updates when already inNavigationCameraState.followingstate.Declaration
Swift
public var followingMobileCamera: CameraOptions -
CameraOptions, which are used on CarPlay when transitioning toNavigationCameraState.followingor for continuous updates when already inNavigationCameraState.followingstate.Declaration
Swift
public var followingCarPlayCamera: CameraOptions -
CameraOptions, which are used on iOS when transitioning toNavigationCameraState.overviewor for continuous updates when already inNavigationCameraState.overviewstate.Declaration
Swift
public var overviewMobileCamera: CameraOptions -
CameraOptions, which are used on CarPlay when transitioning toNavigationCameraState.overviewor for continuous updates when already inNavigationCameraState.overviewstate.Declaration
Swift
public var overviewCarPlayCamera: CameraOptions -
Value of maximum pitch, which will be taken into account when preparing
CameraOptionsduring active guidance navigation.Defaults to
45.0degrees.Declaration
Swift
public var maximumPitch: Double -
Altitude that the
NavigationCamerainitally defaults to when navigation starts.Defaults to
1000.0meters.Declaration
Swift
public var defaultAltitude: CLLocationDistance -
Controls the distance on route after the current maneuver to include in the frame.
Defaults to
100.0meters.Declaration
Swift
public var distanceToFrameAfterManeuver: CLLocationDistance -
Controls how much the bearing can deviate from the location’s bearing, in degrees.
In case if set, the
bearingproperty ofCameraOptionsduring active guidance navigation won’t exactly reflect the bearing returned by the location, but will also be affected by the direction to the upcoming framed geometry, to maximize the viewable area.Defaults to
20.0degrees.Declaration
Swift
public var maximumBearingSmoothingAngle: CLLocationDirection?
-
Initializer of
NavigationViewportDataSourceobject.Declaration
Swift
public required init(_ mapView: MapView, viewportDataSourceType: ViewportDataSourceType = .passive)Parameters
mapViewInstance 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 ifviewportDataSourceTypewas set to.raw).MapViewwill be weakly stored byNavigationViewportDataSource.viewportDataSourceTypeType of locations, which will be used to prepare
CameraOptions.
-
Declaration
Swift
public func locationUpdate(newLocation: Location)
Install in Dash
NavigationViewportDataSource Class Reference