I am trying to make a passive navigation system 'free driving mode', I've looked everywhere including the docs and have no idea how to move forward with the 'PassiveLocationManager' (https://docs.mapbox.com/ios/navigation/overview/free-driving/).
'Cannot convert value of type 'CLLocationManager' to expected argument type 'NavigationLocationManager?''
See code below...
struct NavView: UIViewRepresentable {
func makeCoordinator() -> Coordinator {
return Coordinator(self)
}
private let nav: MGLMapView = MGLMapView(frame: .zero, styleURL: MGLStyle.streetsStyleURL)
func makeUIView(context: UIViewRepresentableContext<NavView>) -> MGLMapView {
nav.delegate = context.coordinator
nav.layer.cornerRadius = 25
nav.locationManager = PassiveLocationManager(dataSource: PassiveLocationDataSource(directions: Directions.shared, systemLocationManager: CLLocationManager()))
return nav
}
func updateUIView(_ uiView: MGLMapView, context: UIViewRepresentableContext<NavView>) {
//
}
}