NavigationViewportDataSource

public class NavigationViewportDataSource : ViewportDataSource
extension NavigationViewportDataSource: LocationConsumer

Class, which conforms to ViewportDataSource protocol and provides default implementation of it.

  • 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 via LocationConsumer (in case if viewportDataSourceType was set to .raw). MapView will be weakly stored by NavigationViewportDataSource.

    viewportDataSourceType

    Type of locations, which will be used to prepare CameraOptions.