FasterRouteController.RouteNotification type representing the notification object from the Directions API. RouteLeg now exposes a notifications property ([RouteNotification]?) that decodes constraint violation and alert notifications returned alongside route legs.legIndex was passed to NavigationController.switchLeg(newLegIndex:).MapMatchingState.URLDataCache.NavigationViewController style manager setup.DirectionsOptions.distanceMeasurementSystem in favor of the new DirectionsOptions.unitMeasurementSystem.DistanceFormatter.measurementSystem in favor of the new DistanceFormatter.unitMeasurementSystem.CoreConfig.unitOfMeasurement. Use DirectionsOptions.unitMeasurementSystem to set the unit system for a navigation session.MeasurementSystem and UnitOfMeasurement in favor of the new UnitMeasurementSystem.RouteOptions, MatchOptions, and MatrixOptions URL request parameters so that it only contains the supported variants.distanceRemaining and durationRemaining when starting active guidance.RoadGraph.Edge.Metadata properties by adding freeFlowSpeed, constrainedFlowSpeed, isFerry, isRoundabout, countryCodeISO3, surface and sapaType members.ElectronicHorizonConfig.enableEnhancedDataAlongEH option to allow requesting additional data from ADAS layer.RoadGraph.adasAttributes(edgeIdentifier:) to fetch ADASAttributes on a given edge.RoadObjectMatcher is removed. RoadObjectStore is extended to cover it's functionality instead. (Note: The Mapbox Electronic Horizon feature of the Mapbox Navigation SDK is in public beta and is subject to changes)NavigationMapView.traversedRouteColor was provided.bearings parameter is not included by default in Map Matching API requests because it is not supported. Along with snapping_include_closures and snapping_include_static_closures, this parameter is supported only by the Directions API.Waypoint.snapping_include_closures and Waypoint.snapping_include_static_closures after encoding and decoding.MapboxMaps.MapView is now initialized by NavigationMapView using MapboxMaps.MapInitOptions(locationDataModel:). This passes location and heading providers during initialization, rather than overriding them afterwards using MapboxMaps.MapView.location.override(locationProvider:headingProvider:). This prevents MapView from creating a redundant MapboxMaps.AppleLocationProvider (which is unused by NavigationMapView and the Navigation SDK).NavigationViewController.NavigationMapView.stop() was called.DirectionsOptions, IsochroneOptions, and MatrixOptions - an error is logged when duplicates are found.RouteVoiceController.init(routeProgressing:rerouteStarted:fasterRouteSet:speechSynthesizer:) in favor of the new RouteVoiceController.init(routeProgressing:rerouteSoundTrigger:speechSynthesizer:).AVAudioPlayer within the MapboxSpeechSynthesizer are now triggered on a background thread. This change minimizes the risk of the application hanging during voice instruction playback.DirectionsOptions subclass.CongestionColorsConfiguration.displaySoftGradientForTraffic to customize if the color transition between traffic congestion changes should use a soft gradient appearance or abrupt color change.ViewportState.routeProgress is deprecated and is always nil now. Use ViewportState.navigationProgress instead.ViewportState.heading is deprecated and is always nil now. Use ViewportState.navigationHeading instead.ViewportState.location is deprecated in favor of ViewportState.navigationLocation instead.ViewportState.init(location:routeProgress:viewportPadding:heading:) is deprecated in favor of ViewportState.init(navigationLocation:navigationProgress:viewportPadding:navigationHeading:).ViewportDataSource for the navigation camera, migrate to viewportState.navigationProgress for tracking active guidance progress.NavigationCamera state updates.Task.detached usage in NavigationController.NWPathMonitor caused by a non-stopped monitor.Sendable conformance for types from Turf and Maps.NavigationRoute.nativeRoute, NavigationRoute.init?(nativeRoute:), and AlternativeRoute.init?(mainRoute:alternativeRoute:) are deprecated and should no longer be used.CoreConfig.routeRequestConfig is deprecated. Configure request options directly using RouteOptions and MatchOptions.TelemetryAppMetadata.userId and TelemetryAppMetadata.sessionId are deprecated and no longer have any effect.RouteOptions subclass. If you subclass RouteOptions, make sure to implement urlQueryItems, init(from:), encode(to:), and init(waypoints:profileIdentifier:queryItems:).NavigationRouteOptions.init(waypoints:profileIdentifier:queryItems:) and NavigationMatchOptions.init(waypoints:profileIdentifier:queryItems:) set the default values for shapeFormat, locale, distanceMeasurementSystem, routeShapeResolution, includesSpokenInstructions, and includesVisualInstructions only if the values were not passed in queryItems.RoutingConfig.datasetProfileIdentifier was added to configure the dataset profile for routing tiles. It is important to set this value before initializing MapboxNavigationProvider and use the same value for the following ProfileIdentifier in route requests options.Fixed an incorrect CarPlayActivity value passed in CarPlayManagerDelegate function calls:
carPlayManager(_:, leadingNavigationBarButtonsCompatibleWith traitCollection:, in:, for:),carPlayManager(_:, trailingNavigationBarButtonsCompatibleWith traitCollection:, in:, for:),carPlayManager(_:, mapButtonsCompatibleWith traitCollection:, in:, for:).Now CarPlayActivity.panningInBrowsingMode and CarPlayActivity.panningInNavigationMode are passed in the above delegate function calls when the map is panned after showing the panning interface. Previously, those values were only passed at the moment of initial presentation of the panning interface and immediately after performing any panning (or any action that exits the map camera's follow mode), the passed CarPlayActivity was reverted to CarPlayActivity.browsing or CarPlayActivity.navigating even though the panning interface was still shown.
In addition, CarPlayManager.currentActivity is also updated correctly in the mentioned scenarios.
Fixed a problem that navigation bar buttons would not be updated properly for navigation mode when customized with CarPlayManagerDelegate implementation, because of too early execution of calls to CarPlayManagerDelegate functions:
carPlayManager(_:, leadingNavigationBarButtonsCompatibleWith traitCollection:, in:, for:),carPlayManager(_:, trailingNavigationBarButtonsCompatibleWith traitCollection:, in:, for:),carPlayManager(_:, mapButtonsCompatibleWith traitCollection:, in:, for:).Those calls were previously executed before CarPlayNavigationViewController instantiation. Now they are performed after CarPlayNavigationViewController instantiation, right after calling CarPlayManagerDelegate.carPlayManager(_:, willPresent:).
StepsViewController.measurementSystem is now public.Note: The Mapbox Electronic Horizon feature of the Mapbox Navigation SDK is in public beta and is subject to changes, including its pricing. Use of the feature is subject to the beta product restrictions in the Mapbox Terms of Service. Mapbox reserves the right to eliminate any free tier or free evaluation offers at any time and require customers to place an order to purchase the Mapbox Electronic Horizon feature, regardless of the level of use of the feature.
RoadObject initializer is now optional.NavigationController.bannerInstructions. Now a new event is published only when a new banner instruction is available and not with every route progress update.precondition and preconditionFailure to avoid possible runtime crashes in Release builds.StandardDayStyle().apply(). The StandardDayStyle and StandardNightStyle are still default values when initializing NavigationViewController and can be changed by setting NavigationOptions.styles value.ProfileIdentifier comparison for the custom profile identifiers, so that route refresh is enabled for custom automobileAvoidingTraffic profilesencode(to:) methods in DirectionsOptions, MatchOptions, RouteOptions, and others open classes are now declared as open instead of public.@_spi(ExperimentalMapboxAPI) import MapboxNavigationCore. Enable it by setting NavigationMapView.apiRouteCalloutViewProviderEnabled to true, then configure using NavigationMapView.routeCalloutViewProvider property. New NavigationMapView.showRoutes(_:) and NavigationMapView.showcaseRoutes(_:routesPresentationStyle:animated:duration:) methods are available without routeAnnotationKinds parameter but original methods NavigationMapView.show(_:routeAnnotationKinds:) and NavigationMapView.showcase(_:routesPresentationStyle:routeAnnotationKinds:animated:duration:) also work and their routeAnnotationKinds parameter is ignored when NavigationMapView.apiRouteCalloutViewProviderEnabled is set to true.NavigationViewControllerDelegate.automaticallyAdjustsStyleForTimeOfDay is set to true.NavigationViewControllerDelegate.navigationViewController(_:didArriveAt:) was not called for intermediate waypoints.distanceUnit passed to the NavigationRouteOptions and NavigationMatchOptions initializers was not correctly applied to the distanceMeasurementSystem.SessionController.session was emitting Session updates with the same value (no state change).NavigationRoutes couldn't be created due to too similar alternatives.NavigationMapView.automaticallySetDeclarativeMapContent to false,NavigationMapView.navigationStyleContent updates,currentNavigationStyleContent to your MapStyleContent,setMapStyleContent(content:) with new map style content.
For implementation details, refer to the Declarative-Map sample app.
Set NavigationMapView.useLegacyManualLayersOrderApproach to true to enable legacy manual layer order calculation.startLegIndex when checking the waypoints for billing session for multiwaypoint routes. The SDK now correctly supports resuming a previous active guidance billing session when startLegIndex is greater than 0.MapboxSpeechSynthesizer.prepareIncomingSpokenInstructions(_:) and MapboxSpeechSynthesizer.speak(_:during:) are deprecated in favor of MapboxSpeechSynthesizer.prepareIncomingSpokenInstructions(_:locale:) and MapboxSpeechSynthesizer.speak(_:during:locale:).CarPlayNavigationViewController, trip travel estimates now show 1 instead of 0 minutes remaining when there is less than 1 minute remaining.RerouteConfig.rerouteStrategyForMatchRoute to configure rerouting behavior with map-matched routes.NavigationMapView.routeAnnotationCaptionTextFontNavigationMapView.routeAnnotationCaptionTextColorNavigationMapView.routeAnnotationSelectedCaptionTextColorRouteOptions.locale for on-device speech synthesizing if the Mapbox Voice API does not support the requested language.CarPlayNavigationViewController showed a midpoint arrival view even when arrived at the final destination.RouteOptions initialization with url query items with invalid target coordinates parameters set. The failure pattern is:
RouteOptions.init(waypoints:profileIdentifier:queryItems:) initializer.waypoint_targets query item with empty data for at least one waypoint. It may look like this: waypoint_targets=;-86.790838,36.152884. More information here: Optional parametersWaypoint object is extended with TimeZoneInformation.AVAudioSession.tryDuckAudio()AVAudioSession.tryUnduckAudio()CarPlayNavigationViewControllerDelegate to NavigationMapViewDelegate.MapboxCopilot.startActiveGuidanceSession(requestIdentifier:route:searchResultUsed:), MapboxCopilot.startFreeDriveSession(), and MapboxCopilot.completeNavigationSession() are deprecated in favor of MapboxCopilot.startActiveGuidanceSessionAsync(requestIdentifier:route:searchResultUsed:), MapboxCopilot.startFreeDriveSessionAsync(), MapboxCopilot.completeNavigationSessionAsync(). Using deprecated methods may lead to losing events in the recorded history files.NavigationViewControllerDelegate.navigationViewController(_:didAdd:pointAnnotationManager:)CarPlayNavigationViewControllerDelegate.carPlayNavigationViewController(_:didAdd:pointAnnotationManager:)CarPlayMapViewControllerDelegate.carPlayMapViewController(_:didAdd:pointAnnotationManager:)CarPlayManagerDelegate.carPlayManager(_:didAdd:to:pointAnnotationManager:)CPTemplate:
CarPlayManagerDelegate.carPlayManager(_:leadingNavigationBarButtonsCompatibleWith:in:for:)CarPlayManagerDelegate.carPlayManager(_:trailingNavigationBarButtonsCompatibleWith:in:for:)CPMapTemplate:
CarPlayManagerDelegate.carPlayManager(_:leadingNavigationBarButtonsCompatibleWith:in:for:)CarPlayManagerDelegate.carPlayManager(_:trailingNavigationBarButtonsCompatibleWith:in:for:)SimulatedLocationManager when starting the simulation at the point on the route far away from the start.SimulatedLocationManager.RouteProgress in NavigationController.SimulatedLocationManager.RouteProgress in NavigationController.MapboxCopilot.startActiveGuidanceSession(requestIdentifier:route:searchResultUsed:), MapboxCopilot.startFreeDriveSession(), and MapboxCopilot.completeNavigationSession() are deprecated in favor of MapboxCopilot.startActiveGuidanceSessionAsync(requestIdentifier:route:searchResultUsed:), MapboxCopilot.startFreeDriveSessionAsync(), MapboxCopilot.completeNavigationSessionAsync(). Using deprecated methods may lead to losing events in the recorded history files.NavigationViewControllerDelegate.navigationViewController(_:didAdd:pointAnnotationManager:)CarPlayNavigationViewControllerDelegate.carPlayNavigationViewController(_:didAdd:pointAnnotationManager:)CarPlayMapViewControllerDelegate.carPlayMapViewController(_:didAdd:pointAnnotationManager:)CarPlayManagerDelegate.carPlayManager(_:didAdd:to:pointAnnotationManager:)CPTemplate:
CarPlayManagerDelegate.carPlayManager(_:leadingNavigationBarButtonsCompatibleWith:in:for:)CarPlayManagerDelegate.carPlayManager(_:trailingNavigationBarButtonsCompatibleWith:in:for:)CPMapTemplate:
CarPlayManagerDelegate.carPlayManager(_:leadingNavigationBarButtonsCompatibleWith:in:for:)CarPlayManagerDelegate.carPlayManager(_:trailingNavigationBarButtonsCompatibleWith:in:for:)SimulatedLocationManager when starting the simulation at the point on the route far away from the start.NavigationViewController transitions navigation to the idle state when its presented controllers disappear. Instead, it happens only when it disappears.RerouteConfig.optionsCustomization is deprecated in favor of RerouteConfig.urlOptionsCustomization. Using the deprecated optionsCustomization may lead to losing custom query items at reroutes.NavigationRoutes.NavigationMapViewDelegate.navigationMapView(_:shapeFor:legIndex:) documentation.NavigationMapView.customRouteLineLayerPosition was not applied in runtime.