Free driving
The Navigation SDK for iOS is only available upon request. Contact us to get started.
When you use navigation without a specified route, it’s called free driving. Free driving provides detailed information about the current location such as speed, speed limit, country code, street name, road characteristics, and so on.
At any time, you can switch from free driving mode to turn-by-turn navigation using the
Navigation.update(routePlan: RoutePlan)
method. You can learn more about updating theRoute
in the Update route guide.
Start navigation
First, add the navigation module to your project and set up a Navigation
object. Learn how to do this in the Quickstart guide.
Once Navigation
is initialized, you can start navigation using the Navigation.start()
method.
navigation.start()
Stop navigation
To stop any currently running navigation use the Navigation.stop()
method. This method also clears all data related to navigation. If navigation has not been started, the stop method has no effect.
navigation.stop()
Current location context updates
To get current location context updates, set up a NavigationLocationContextObserver::func didDetectLocationContext(locationContext: LocationContext)
callback. More details about location context can be found in the location context guide.
1func didDetectLocationContext(locationContext: LocationContext) {2 let speed: Measurement<UnitSpeed> = locationContext.speed3 let speedLimit: SpeedLimit? = locationContext.speedLimit45 let countryCode: String = locationContext.address.countryCode6 let city: String = locationContext.address.city7 let streetName: String = locationContext.address.streetName89 let functionalRoadClass: Int? = locationContext.road?.functionalRoadClass10 let isRoadTunnel: Bool? = locationContext.road?.isTunnel11 let isRoadUnderpass: Bool? = locationContext.road?.isUnderpass12}

Next steps
Since you have learned about free driving, here are recommendations for the next steps: