Other Classes
The following classes are available globally.
-
See moreDispatchTimeris a general-purpose wrapper over theDispatchSourceTimermechanism in GCD. -
Feedback Model Object for End Of Route Experience.
See more -
The
See moreNavigationEventsManageris responsible for being the liaison between MapboxCoreNavigation and the Mapbox telemetry framework. -
See moreNavigationLocationManageris the base location manager which handles permissions and background modes.Declaration
Swift
-
A
NavigationRouteOptionsobject specifies turn-by-turn-optimized criteria for results returned by the Mapbox Directions API.NavigationRouteOptionsis a subclass ofRouteOptionsthat has been optimized for navigation. Pass an instance of this class into theDirections.calculate(_:completionHandler:)method.See moreNote
NavigationRouteOptionsis designed to be used with theDirectionsandNavigationDirectionsclasses for specifying routing criteria. To customize the user experience in aNavigationViewController, use theNavigationOptionsclass. -
A
NavigationMatchOptionsobject specifies turn-by-turn-optimized criteria for results returned by the Mapbox Map Matching API.NavigationMatchOptionsis a subclass ofMatchOptionsthat has been optimized for navigation. Pass an instance of this class into theDirections.calculateRoutes(matching:completionHandler:).method.Note: it is very important you specify the
See morewaypointsfor the route. Usually the only two values for thisIndexSetwill be 0 and the length of the coordinates. Otherwise, all coordinates passed through will be considered waypoints. -
A wrapper for the
UserDefaultsclass for navigation-specific settings.Properties are prefixed before they are stored in
UserDefaults.standard.To specify criteria when calculating routes, use the
See moreNavigationRouteOptionsclass. To customize the user experience during a particular turn-by-turn navigation session, use theNavigationOptionsclass when initializing aNavigationViewController. -
A
NavigationDirectionsobject provides you with optimal directions between different locations, or waypoints. The directions object passes your request to a built-in routing engine and returns the requested information to a closure (block) that you provide. A directions object can handle multiple simultaneous requests. ARouteOptionsobject specifies criteria for the results, such as intermediate waypoints, a mode of transportation, or the level of detail to be returned. In addition toDirections,NavigationDirectionsprovides support for offline routing.Each result produced by the directions object is stored in a
See moreRouteobject. Depending on theRouteOptionsobject you provide, each route may include detailed information suitable for turn-by-turn directions, or it may include only high-level information such as the distance, estimated travel time, and name of each leg of the trip. The waypoints that form the request may be conflated with nearby locations, as appropriate; the resulting waypoints are provided to the closure. -
See moreReplayLocationManagerreplays an array of locations exactly as they were recorded with the single exception of the location’s timestamp which will be adjusted by interval between locations. -
The
SimulatedLocationManagerclass simulates location updates along a given route.The route will be replaced upon a
See moreRouteControllerDidReroutenotification. -
A user interface element designed to display the estimated arrival time, distance, and time remaining, as well as give the user a control the cancel the navigation session.
See more -
A control indicating the direction that the vehicle is traveling towards.
See more -
See moreCarPlayMapViewControlleris responsible for administering the Mapbox map, the interface styles and the map template buttons to display on CarPlay.Declaration
Swift
-
CarPlaySearchControlleris the main object responsible for managing the search feature on CarPlay.Messages declared in the
CPApplicationDelegateprotocol should be sent to this object in the containing application’s application delegate. ImplementCarPlaySearchControllerDelegatein the containing application and assign an instance to thedelegateproperty of yourCarPlaySearchControllerinstance.See moreNote
It is very important you have a singleCarPlaySearchControllerinstance at any given time.Declaration
Swift
-
See moreDefaultStyleis default style for Mapbox Navigation SDK. -
See moreNightStyleis the default night style for Mapbox Navigation SDK. Only will be applied when necessary and ifautomaticallyAdjustStyleForSunPosition. -
A single feedback item displayed on an instance of
See moreFeedbackViewController. -
A view controller containing a grid of buttons the user can use to denote an issue their current navigation experience.
See moreDeclaration
Swift
-
See moreGenericRouteShieldis a class to render routes that do not have route-shields. -
The Mapbox voice controller plays spoken instructions using the MapboxSpeech framework.
You initialize a voice controller using a
NavigationServiceinstance. The voice controller observes when the navigation service hints that the user has passed a spoken instruction point and responds by converting the contents of aSpokenInstructionobject into audio and playing the audio.The MapboxSpeech framework requires a network connection to connect to the Mapbox Voice API, but it produces superior speech output in several languages including English. If the voice controller is unable to connect to the Voice API, it falls back to the Speech Synthesis framework as implemented by the superclass,
RouteVoiceController. To mitigate network latency over a cell connection,MapboxVoiceControllerprefetches and caches synthesized audio.If you need to supply a third-party speech synthesizer that requires a network connection, define a subclass of
MapboxVoiceControllerthat overrides thespeak(_:)method. If the third-party speech synthesizer does not require a network connection, you can instead subclassRouteVoiceController.The Mapbox Voice API is optimized for spoken instructions provided by the Mapbox Directions API via the MapboxDirections.swift framework. If you need text-to-speech functionality outside the context of a navigation service, use the Speech Synthesis framework’s
See moreAVSpeechSynthesizerclass directly. -
Customization options for the turn-by-turn navigation user experience in a
NavigationViewController.A navigation options object is where you place customized components that the navigation view controller uses during its lifetime, such as styles or voice controllers. You would likely use this class if you need to specify a Mapbox access token programmatically instead of in the Info.plist file.
See moreNote
NavigationOptionsis designed to be used with theNavigationViewControllerclass to customize the user experience. To specify criteria when calculating routes, use theNavigationRouteOptionsclass. To modify user preferences that persist across navigation sessions, use theNavigationSettingsclass. -
A view that represents the root view of the MapboxNavigation drop-in UI.
Components
- InstructionsBannerView
- InformationStackView
- BottomBannerView
- ResumeButton
- WayNameLabel
- FloatingStackView
- NavigationMapView
- SpeedLimitView
See more+--------------------+ | 1 | +--------------------+ | 2 | +---+------------+---+ | 8 | | | +---+ | 6 | | | | | 7 +---+ | | | | | | +------------+ | | 4 || 5 | | +------------+-------+ | 3 | +--------------------+ -
A view that displays a speed limit and resembles a real-world speed limit sign.
See more -
:nodoc
See more -
-
Declaration
Swift
-
A view representing the user’s location on screen.
See more
Install in Dash
Other Classes Reference