Skip to main content

interface

CameraMoveController​

Allows you to control the camera position for animation needs
The class must be thread-safe.

Methods
nonisolated func position(
time: TimeInterval
) -> CameraPosition
Parameters

time

TimeInterval
Returns
nonisolated func animationTime() -> TimeInterval
Returns
TimeInterval

CustomFollowController​

Interface that can be implemented on the platform to create a custom parameter tracking controller. To add a controller to the camera, implement this interface and create a FollowController object by passing an object that implements this interface as an argument.

Methods
nonisolated func availableValues() -> FollowValueOptionSet
nonisolated func requestValues(
values: FollowValueOptionSet
)
Parameters
nonisolated func setNewValuesNotifier(
notifier: NewValuesNotifier?
)
Parameters
nonisolated func coordinates() -> GeoPoint?
Returns
nonisolated func bearing() -> Bearing?
Returns
nonisolated func tilt() -> Tilt?
Returns
nonisolated func styleZoom() -> StyleZoom?
Returns

IBriefInfoProvider​

Methods
func provide(
transportMode: TransportMode
) async throws -> BriefInfo?
Parameters

transportMode

Returns

ICancellable​

Token to cancel the operation, at the start of which it was obtained.

Methods
func cancel()

IDirectoryObjectViewsFactory​

Methods
func makeTitleView() -> AnyView
Returns
AnyView
func makeSubtitleView() -> AnyView
Returns
AnyView
func makeRatingView() -> AnyView
Returns
AnyView
func makeDistanceView() -> AnyView
Returns
AnyView
func makeShortAddressView() -> AnyView
Returns
AnyView
func makeAlertView() -> AnyView
Returns
AnyView
func makeFullAddressView(minimizeCard: @escaping MinimizeCardAction) -> AnyView
Parameters

minimizeCard

MinimizeCardAction
Returns
AnyView
func makeAdditionalInformationView() -> AnyView
Returns
AnyView
func makeWorkingHoursView() -> AnyView
Returns
AnyView
func makePorchesView() -> AnyView
Returns
AnyView
func makeCloseButton(action: @escaping (() -> Void)) -> AnyView
Returns
AnyView
func makeContactsView() -> AnyView
Returns
AnyView
func makeSitesAndSocialNetworksView() -> AnyView
Returns
AnyView
func makeChargingStationView() -> AnyView
Returns
AnyView

IDirectorySearchViewsFactory​

Methods
func makeHistoryItemView(
item: DirectorySearchHistoryItem,
hasDivider: Bool,
removeTitle: String,
onTap: @escaping () -> Void,
onRemove: @escaping () -> Void
) -> AnyView
Parameters

item

hasDivider

removeTitle

Returns
AnyView
func makeSuggestItemView(
item: DirectorySearchSuggestItem,
isHistoryItem: Bool,
hasDivider: Bool,
onTap: @escaping () -> Void
) -> AnyView
Parameters

item

isHistoryItem

hasDivider

Returns
AnyView
func makeSearchResultItemView(
object: DirectoryObject,
lastLocation: GeoPoint?,
onTap: @escaping (DirectoryObject) -> Void
) -> AnyView
Parameters

object

lastLocation

Returns
AnyView

IDirectoryViewsFactory​

Factory of directory SwiftUI elements.

Methods
func makeVoiceAssistantView(speechService: (any IVoiceAssistantService)?) -> VoiceAssistantView

SwiftUI element for voice input.

func makeSearchResultItemView(
object: DirectoryObject,
onTap: @escaping (DirectoryObject) -> Void,
lastLocation: GeoPoint?
) -> SearchResultItemView

SwiftUI element of an object card in search results.

Parameters
func makeDirectorySearchView(
searchManager: SearchManager,
searchHistory: SearchHistory?,
visibleAreaEdgeInsets: Binding<EdgeInsets>,
expansionState: Binding<DirectorySearchViewExpansionState>,
configuration: DirectorySearchViewConfiguration,
viewsFactory: IDirectorySearchViewsFactory?,
onObjectTap: @escaping (DirectoryObject) -> Void,
onObjectSuggestTap: @escaping (DirectoryObject) -> Void
) -> DirectorySearchView
Parameters

searchManager

searchHistory

expansionState

Binding<>

configuration

viewsFactory

Returns
func makeDirectoryObjectView(
onDismiss: @escaping () -> Void,
onShowEntrances: (([EntranceInfo]) -> Void)?,
visibleAreaEdgeInsets: Binding<EdgeInsets>
) -> DirectoryObjectView

SwiftUI element with full information about a directory object.

func makeDirectoryObjectView(
onDismiss: @escaping () -> Void,
onShowEntrances: (([EntranceInfo]) -> Void)?,
visibleAreaEdgeInsets: Binding<EdgeInsets>,
viewsFactory: IDirectoryObjectViewsFactory
) -> DirectoryObjectView

SwiftUI element with full information about a directory object.

Parameters
func makeDefaultDirectoryObjectViewsFactory(
edgeInsets: Binding<EdgeInsets>,
onDismiss: @escaping () -> Void,
onShowEntrances: (([EntranceInfo]) -> Void)?
) -> IDirectoryObjectViewsFactory

SwiftUI element factory for the View with detailed information about a directory object.

func makeDirectorySearchView(
searchManager: SearchManager,
searchHistory: SearchHistory?,
visibleAreaEdgeInsets: Binding<EdgeInsets>,
expansionState: Binding<DirectorySearchViewExpansionState>,
configuration: DirectorySearchViewConfiguration,
onObjectTap: @escaping (DirectoryObject) -> Void,
onObjectSuggestTap: @escaping (DirectoryObject) -> Void
) -> DirectorySearchView
Parameters

searchManager

searchHistory

expansionState

Binding<>

configuration

Returns
func makeDirectorySearchView(
searchManager: SearchManager,
visibleAreaEdgeInsets: Binding<EdgeInsets>,
expansionState: Binding<DirectorySearchViewExpansionState>,
configuration: DirectorySearchViewConfiguration,
onObjectTap: @escaping (DirectoryObject) -> Void
) -> DirectorySearchView
Parameters

searchManager

expansionState

Binding<>

configuration

Returns
func makeDirectorySearchView(
searchManager: SearchManager,
searchHistory: SearchHistory?,
visibleAreaEdgeInsets: Binding<EdgeInsets>,
expansionState: Binding<DirectorySearchViewExpansionState>,
configuration: DirectorySearchViewConfiguration,
onObjectTap: @escaping (DirectoryObject) -> Void
) -> DirectorySearchView
Parameters

searchManager

searchHistory

expansionState

Binding<>

configuration

Returns
func makeDirectorySearchView(
searchManager: SearchManager,
visibleAreaEdgeInsets: Binding<EdgeInsets>,
configuration: DirectorySearchViewConfiguration,
onObjectTap: @escaping (DirectoryObject) -> Void
) -> DirectorySearchView
Parameters
func makeDirectorySearchView(
searchManager: SearchManager,
searchHistory: SearchHistory?,
visibleAreaEdgeInsets: Binding<EdgeInsets>,
expansionState: Binding<DirectorySearchViewExpansionState>,
configuration: DirectorySearchViewConfiguration,
viewsFactory: IDirectorySearchViewsFactory,
onObjectTap: @escaping (DirectoryObject) -> Void
) -> DirectorySearchView
Parameters

searchManager

searchHistory

expansionState

Binding<>

configuration

viewsFactory

Returns
func makeDirectorySearchView(
searchManager: SearchManager,
visibleAreaEdgeInsets: Binding<EdgeInsets>,
expansionState: Binding<DirectorySearchViewExpansionState>,
configuration: DirectorySearchViewConfiguration,
viewsFactory: IDirectorySearchViewsFactory,
onObjectTap: @escaping (DirectoryObject) -> Void
) -> DirectorySearchView
Parameters

searchManager

expansionState

Binding<>

configuration

viewsFactory

Returns
func makeDirectorySearchView(
searchManager: SearchManager,
visibleAreaEdgeInsets: Binding<EdgeInsets>,
configuration: DirectorySearchViewConfiguration,
viewsFactory: IDirectorySearchViewsFactory,
onObjectTap: @escaping (DirectoryObject) -> Void
) -> DirectorySearchView
Parameters
func makeDirectorySearchView(
searchManager: SearchManager,
searchHistory: SearchHistory?,
visibleAreaEdgeInsets: Binding<EdgeInsets>,
configuration: DirectorySearchViewConfiguration,
onObjectTap: @escaping (DirectoryObject) -> Void
) -> DirectorySearchView
Parameters
func makeDirectorySearchView(
searchManager: SearchManager,
searchHistory: SearchHistory?,
visibleAreaEdgeInsets: Binding<EdgeInsets>,
configuration: DirectorySearchViewConfiguration,
viewsFactory: IDirectorySearchViewsFactory,
onObjectTap: @escaping (DirectoryObject) -> Void
) -> DirectorySearchView
Parameters

IDoubleTapAndPanGestureRecognizer​

Properties

var scaleDoublingTranslation​

Number of vertical shift points resulting in a twofold change in scale.
The default value for the gesture handler is -100. Shifting down (increasing y) increases the scale. Shifting up (decreasing y) decreases the scale. To scale up by 2x, at this scaling speed value, you need to swipe down by 100 pt.

IEnergyConsumption​

Protocol for setting the power saving of the device.

Methods
func setFpsCallback(_ fpsCallback: FpsCallback?)

Sets the callback function for changing FPS.

Parameters

fpsCallback

FpsCallback?
Properties

var maxFps​

Maximum allowable map refresh frequency.
If not specified, it is equal to the screen refresh frequency.

var powerSavingMaxFps​

Maximum allowable map refresh frequency in the power saving mode.
If not specified, it is equal to maxFps.

IHTTPClient​

Network client interface for sending HTTP requests.

Methods
func send(
request: URLRequest,
callback: @escaping RequestDataCompletionCallback
)

Sends a request and getting the result through the callback. The results will be processed in the callback.

Parameters

request

URLRequest

HTTP request.

callback

RequestDataCompletionCallback

Callback function when obtaining the result of a request.

IImageFactory​

Methods
func make(pngData: Data, size: CGSize) -> Image
Parameters

pngData

Data

size

Returns
func make(svgData: Data, size: CGSize) -> Image
Parameters

svgData

Data

size

Returns
func make(lottieData: Data, size: CGSize) -> Image
Parameters

lottieData

Data

size

Returns
func make(image: UIImage) -> Image
Parameters

image

Returns
func make(imageFactory: @escaping () -> UIImage) -> Image

Creates an image based on a deferred UIImage object. The passed closure is called with delay at the moment when data is needed. The make(pngData:size:) method works more efficiently with ready PNG data.

Returns

ILocationProvider​

Geoposition source interface that the platform implements.

Methods
func setCallbacks(
locationCallback: LocationCallback?,
availabilityCallback: AvailabilityCallback?
)

Set the callback functions to update the current geoposition and change the availability of the geoposition source. Calling this method again overwrites the previously set callback functions. If both parameters are nil, geoposition update tracking must be disabled.

Parameters

locationCallback

LocationCallback?

Updates the current geoposition. If the provider is available ( calling availabilityCallback returns true), this source always delivers a valid geoposition. A valid geoposition is a geoposition in which all fields have the current value at the time it was sent to this channel (i.e. if the accuracy of the geoposition >= half the length of the Earth's equator, the geoposition is valid for any of the correct coordinates specified in it). If the accuracy value <= 0, the position is considered unreliable even if isAvailable == true. See the CLLocationManagerDelegate.locationManager(didUpdateLocations:) method.

availabilityCallback

AvailabilityCallback?

Changes the availability of the geoposition source. If this function is called with the value true, all subsequent locationCallback calls will contain a valid (up-to-date) geoposition. Even if tracking of geoposition changes is unavailable, the ILocationProvider implementation may send a new geoposition, but it will be considered unreliable. See the CLLocationManagerDelegate.locationManager(didFailWithError:) method.

func setDesiredAccuracy(_ accuracy: DesiredAccuracy)

Sets the desired accuracy of the positioning. If the device cannot return a location with the desired accuracy, it may return a location with a lower accuracy. If the platform does not provide a method with similar functionality, this method must have an empty implementation.
See the CLLocationManager.desiredAccuracy method and \ .

Parameters

IMagneticHeadingProvider​

Protocol that provides the direction of the device relative to the direction to magnetic north. All methods of this interface must be called from the IPositioningServicesFactory.positiningQueueue queue.

Methods
func setCallbacks(
headingCallback: HeadingCallback?,
availabilityCallback: AvailabilityCallback?
)

Sets the callback functions to update the current direction and change the availability of the direction source. Calling this method again overwrites previous callback functions. If both parameters are nil, direction update tracking must be disabled.

Parameters

headingCallback

HeadingCallback?

Callback function to update the current direction. See the CLLocationManagerDelegate.locationManager(didUpdateHeading:) method.

availabilityCallback

AvailabilityCallback?

Changes the availability of the direction source. Even if direction change tracking is not available, the implementation can send a new direction, but it will be considered invalid. See the CLLocationManagerDelegate.locationManager(didFailWithError) method.

IMapCoordinateSpace​

Map coordinate space. If the map does not exist, coordinate transformations return them unchanged, and bounds equals .zero. Methods and properties can only be accessed from the main queue.

IMapEventProcessor​

Map gesture handler. All coordinates are taken in physical points (pixels).

Methods
func process(event: Event)

Processing the map control event.

Parameters

event

Map control event.

IMapFactory​

Matching map object factory.

Methods
func makeMapViewsFactory(
theme: MapControlsTheme
) -> IMapViewsFactory

Factory of standard SwiftUI map UI controls that use the specified style.

Parameters
func makeMapUIControlsFactory(
theme: MapControlsTheme
) -> IMapUIControlsFactory

Factory of standard UIKit map UI controls that use the specified style.

Parameters
Properties

var initialMapViewOptions​

Initial map settings. They don't change after the map is created. Can be read from any queue.

var map​

Map and camera control. Can be accessed from any queue, but synchronization is required in case of simultaneous access.

var mapAsync​

Asynchronous access to the map. If the MapController is still being created, the wait occurs only when this property is explicitly requested.

var mapUIView​

any UIView & IMapUIView

Map layer. Can be read only from the main queue.

var mapView​

Card layer. Can only be read from the main queue.

var gestureUIView​

(any UIView & IMapGestureUIView)?

Gesture processing layer using the initialMapOptions.gestureViewFactory property. Can only be read from the main queue.

var gestureManager​

Class for managing gesture handling.
Affects gestureUIView if the default handler is used.

var mapEventProcessor​

any IMapEventProcessor

Map gestures handler.
Used by gestureView to control map events. Using in combination with gestureView may break the transactional nature of gestures and lead to undefined behavior.

var mapCoordinateSpace​

any IMapCoordinateSpace

Map coordinates space.

var mapUIControlsFactory​

any IMapUIControlsFactory

Factory of standard UI map controls using the inline style.

var mapViewsFactory​

any IMapViewsFactory

Factory of standard SwiftUI map controls using the inline style.

var snapshotter​

any IMapSnapshotter

Map image capture tool. Images are made based on the current state. Can be read from any queue.

var energyConsumption​

any IEnergyConsumption

An object for adjusting the power saving of a device.

var markerOverlayUIView​

any IMarkerOverlayUIView

Object for working with UIView markers on the map.

var markerOverlayView​

Object for working with SwiftUI View markers on the map.

IMapGestureUIView​

Default gesture recognizing.

Properties

var doubleTapGestureRecognizer​

Double-tap recognizing. Used to zoom out the map by a fixed ratio.

var panGestureRecognizer​

Drag detection. Used to move the map. Single-tap drag detection is recognized by default.

var twoFingerPanGestureRecognizer​

Two-finger pan recognizing. Used to tilt the map.

var rotationGestureRecognizer​

Map rotation recognizing.

var pinchGestureRecognizer​

Pinch recognizing. Used to scale the map.

var twoFingerTapGestureRecognizer​

Two-finger tap recognizing. Used to zoom in the map by a fixed ratio.

var doubleTapAndPanGestureRecognizer​

(any UIGestureRecognizer & IDoubleTapAndPanGestureRecognizer)?

Double-tap and the following shift recognizing. Used to scale the map.

IMapGestureUIViewFactory​

Factory of a gesture processing layer. Methods are called only on the main queue.

Methods
@available(*, deprecated, message: "Please use makeGestureView(map:eventProcessor:coordinateSpace:)")

func makeGestureUIView(
map: Map,
coordinateSpace: IMapCoordinateSpace
) -> UIView & IMapGestureUIView

Parameters

map

coordinateSpace

Returns
func makeGestureUIView(
map: Map,
eventProcessor: IMapEventProcessor,
coordinateSpace: IMapCoordinateSpace
) -> UIView & IMapGestureUIView
Parameters

map

eventProcessor

coordinateSpace

Returns
@available(*, deprecated, message: "Please use makeGestureView(map:eventProcessor:coordinateSpace:)")

func makeGestureUIView(
map: Map,
coordinateSpace: IMapCoordinateSpace
) -> UIView & IMapGestureUIView

Parameters

map

coordinateSpace

Returns
func makeGestureUIView(
map: Map,
eventProcessor: IMapEventProcessor,
coordinateSpace: IMapCoordinateSpace
) -> UIView & IMapGestureUIView

Creates a gesture processing layer.

Parameters

map

eventProcessor

coordinateSpace

Returns

IMapSnapshotter​

Map image capture tool.

Methods
func makeImage(
scale: CGFloat,
orientation: UIImage.Orientation
) -> Future<UIImage>

Gets an image of a map based on its current state. Can be called from any queue. The value is returned in Future in an undefined queue.
Before calling the method, ensure that the scene displaying the map is in the UIScene.ActivationState.foregroundActive state. For iOS 12, the application must be in the UIApplication.State.active state.

Parameters

scale

orientation

func makeImage(
scale: CGFloat = 1,
orientation: UIImage.Orientation = .up
) -> Future<UIImage>

Gets an image of a map based on its current state. Can be called from any queue. The value is returned in Future in an undefined queue.
Before calling the method, ensure that the scene displaying the map is in the UIScene.ActivationState.foregroundActive state. For iOS 12, the application must be in the UIApplication.State.active state.

Parameters

scale

Multiplier of the received image (see UIImage.scale). Default is 1.

orientation

Image orientation (see UIImage.orientation. Default is .up.

IMapUIControlsFactory​

Factory of UI map controls.

Methods
func makeCurrentLocationUIControl(permissionCallback: @escaping () -> Void) -> UIControl
Returns
func makeRoadEventCreatorButtonUIControl(action: @escaping () -> Void) -> UIControl
Returns
func makeCompassUIControl() -> UIControl
Returns
func makeZoomUIControl() -> UIControl
Returns
func makeIndoorUIControl(showOverview: Bool) -> UIView
Parameters

showOverview

Returns
func makeTrafficAndParkingUIControl() -> UIControl
Returns
func makeTrafficUIControl() -> UIControl
Returns
func makeParkingUIControl() -> UIControl
Returns

IMapUIView​

Map layer.

Methods
func addObjectTappedCallback(callback: MapObjectTappedCallback)

Adds a callback function that is called after a long tap on the map.

Parameters
func addObjectLongPressCallback(callback: MapObjectTappedCallback)
Parameters
func removeObjectTappedCallback(callback: MapObjectTappedCallback)

Removes a callback function that is called after a long tap on the map.

Parameters
func removeLongPressCallback(callback: MapObjectTappedCallback)
Parameters
Properties

var gestureUIView​

(any UIView & IMapGestureUIView)?

Adds a layer for intercepting gestures, placed above the map. When replacing with another layer, you need to implement event sending through the IMapEventProcessor. If the nil value is set, gesture handling is disabled.

var showsAPIVersion​

Whether to show an API version in a copyright. The default value is false.

Sets a copyright position on the map. The default value is bottomRight.

Sets copyright paddings from map edges. The default value is .zero. During positioning, safeAreaInsets are considered. Values cannot be negative.

var urlOpener​

((URL) -> ())?

Handles an URL opening when a user taps the copyright. Allows overriding default behavior when following the link is done without user confirmation.

IMapViewsFactory​

Factory of SwiftUI map controls.

Methods
func makeCurrentLocationView(permissionCallback: @escaping () -> Void) -> AnyView
Returns
AnyView
func makeZoomView() -> AnyView
Returns
AnyView
func makeTrafficAndParkingView() -> AnyView
Returns
AnyView
func makeTrafficView() -> AnyView
Returns
AnyView
func makeParkingView() -> AnyView
Returns
AnyView
func makeIndoorView(showOverview: Bool) -> AnyView
Parameters

showOverview

Returns
AnyView
func makeCompassView() -> AnyView
Returns
AnyView
func makeMiniMapView(mapFactory: IMapFactory) throws -> AnyView
Parameters

mapFactory

Returns
AnyView
func makeRoadEventCreatorButtonView(action: @escaping () -> Void) -> AnyView
Returns
AnyView

IMarkerOverlayUIView​

Managing UIView markers on the map.

Methods
func add(markerView: IMarkerUIView)

Adds a UIView marker.

Parameters

markerView

func add(markerViews: [IMarkerUIView])
Parameters

markerViews

func remove(markerView: IMarkerUIView)

Removes a UIView marker.

Parameters

markerView

func remove(markerViews: [IMarkerUIView])
Parameters

markerViews

func removeAll()

Removes all markers.

IMarkerUIView​

UIView marker.

Properties

var id​

UUID

Marker identifier.

var position​

Point on the map to which the marker is attached.

var tapHandler​

(() -> ())?

Handler for clicking the UIView marker.

IMarkerUIViewFactory​

Factory for creating UIView markers.

Methods
func make(
/// Отображение маркера.
view: UIView,
/// Точка на карте, к которой осуществляется привязка.
position: GeoPointWithElevation,
/// Относительная точка на View, к которой осуществяется привязка.
anchor: Anchor,
/// Дополнительное смещение в пикселях по оси X.
offsetX: CGFloat,
/// Дополнительное смещение в пикселях по оси Y.
offsetY: CGFloat
) -> IMarkerUIView

Creates a marker.

Parameters

IModelFactory​

Methods
func make(modelData: Data) -> ModelData

Creating a model based on binary data.

Parameters

modelData

Data
Returns

INativeScaleProvider​

Protocol describing the point-to-pixel conversion.

Properties

var nativeScale​

Multiplier for conversion to pixels. If no map exists, the value is 1. Can only be accessed from the main queue.

var toPixels​

Point-to-pixel conversion matrix. The x and y multiplier is equal to nativeScale.

INavigationUIControl​

Navigator UI control.

Properties

var isVisible​

Element visibility.

var onDidChangeVisibility​

(() -> ())?

Signal about the element visibility change.

INavigationUIControlsFactory​

Factory of UI navigator controls.

Methods
func makeNextManeuverUIControl(
uiModel: Model
) -> UIView & INextManeuverUIControl

UI control with information about the next and additional maneuvers.

Parameters

uiModel

Returns
func makeSpeedUIControl(
uiModel: Model
) -> (UIView & INavigationUIControl)

UI control with information about the current speed, the speed limit for the current route section, and a warning about passing a camera coverage area.

Parameters

uiModel

func makeRemainingRouteInfoUIControl(
navigationManager: NavigationManager
) -> UIView & INavigationUIControl

UI control with information about the remaining distance and estimated time of arrival or remaining travel time.

Parameters

navigationManager

Returns
func makeMessageBarUIControl(
uiModel: Model
) -> UIView & INavigationUIControl

UI control for displaying navigation status messages, such as route search and GPS signal loss.

Parameters

uiModel

Returns
func makeBetterRouteUIControl(
uiModel: Model
) -> UIView & INavigationUIControl

UI control for switching to a route with a lower estimated time of arrival.

Parameters

uiModel

Returns
func makeThermometerUIControl(
uiModel: Model
) -> UIView & IThermometerUIControl

UI control for displaying vehicle speeds and road events along the route.

Parameters

uiModel

Returns

INavigationUIView​

Methods
func showRoadEvent(_ roadEvent: RoadEvent)

Displays a road event card.

Parameters

roadEvent

Properties

var visibleAreaEdgeInsets​

Visible map area with the navigator interface.

var visibleAreaEdgeInsetsChangedCallback​

((UIEdgeInsets) -> ())?

Callback closure when the map visible area changes.

var finishButtonCallback​

(() -> ())?

Callback closure when clicking the route completion.

INavigationUIViewFactory​

Factory of UI navigator controls.

Methods
func makeNavigationUIControlsFactory() -> INavigationUIControlsFactory

Creates a factory of UI navigator controls.

func makeMapUIControlsFactory(
map: Map,
followManager: INavigatorFollowManager
) -> IMapUIControlsFactory

Creates a factory of UI navigator controls.

Parameters

map

Map controller.

followManager

Switch for following/tracking modes in the navigator.

Returns
func makeNavigationUIView(
map: Map,
navigationManager: NavigationManager,
locationPermissionCallback: @escaping () -> Void
) -> (UIView & INavigationUIView)

Creates a navigator UI.

Parameters

map

Map controller.

navigationManager

Navigation service.

func makeNavigationUIView(
map: Map,
navigationManager: NavigationManager,
navigationUIControlsFactory: INavigationUIControlsFactory?,
mapUIControlsFactory: IMapUIControlsFactory?,
locationPermissionCallback: @escaping () -> Void
) -> (UIView & INavigationUIView)

Creates a navigator UI.

Parameters

map

Map controller.

navigationManager

Navigation service.

navigationUIControlsFactory

mapUIControlsFactory

Custom factory of map UI elements in the navigator. If nil, the default implementation is used.

func makeRouteListUIView(_ routes: [TrafficRoute]) -> IRouteListUIView

Creates a UI of route preview list.

Parameters

routes

Route list.

Returns
func makeRouteUIView(_ route: TrafficRoute) -> IRouteUIView

Creates a route preview UI.

Parameters

route

Returns
func makeRouteDetailsUIView(
_ route: TrafficRoute,
startName: String?,
finishName: String?
) -> IRouteDetailsUIView

Creates a route details UI.

Parameters

route

startName

Name of the starting point of the route.

finishName

Name of the ending point of the route.

Returns

INavigationViewFactory​

Navigator UI factory.

Methods
func makeNavigationViewsFactory() -> INavigationViewsFactory

Creates a factory of SwiftUI navigator controls.

func makeMapViewsFactory(
map: Map,
followManager: INavigatorFollowManager
) -> IMapViewsFactory

Creates a factory of Map SwiftUI elements for the navigator.

Parameters
func makeNavigationView(
map: Map,
navigationManager: NavigationManager,
miniMapFactory: IMapFactory?,
isMiniMapSelected: Binding<Bool>,
locationPermissionCallback: @escaping () -> Void
) -> NavigationView

Creates the navigator UI.

Parameters

map

Map controller.

navigationManager

Navigation service.

miniMapFactory

Factory for minimap controller.

Returns
func makeNavigationView(
map: Map,
navigationManager: NavigationManager,
miniMapFactory: IMapFactory?,
navigationViewsFactory: INavigationViewsFactory?,
mapViewsFactory: IMapViewsFactory?,
isMiniMapSelected: Binding<Bool>,
locationPermissionCallback: @escaping () -> Void
) -> NavigationView

Creates the navigator UI.

Parameters

map

Map controller.

navigationManager

Navigation service.

miniMapFactory

Factory for minimap controller.

navigationViewsFactory

Factory of SwiftUI navigator controls.

mapViewsFactory

Returns
func makeNavigationView(
map: Map,
navigationManager: NavigationManager,
locationPermissionCallback: @escaping () -> Void
) -> NavigationView

Creates the navigator UI.

Parameters

map

Map controller.

navigationManager

Navigation service.

Returns
func makeNavigationView(
map: Map,
navigationManager: NavigationManager,
navigationViewsFactory: INavigationViewsFactory?,
mapViewsFactory: IMapViewsFactory?,
locationPermissionCallback: @escaping () -> Void
) -> NavigationView

Creates the navigator UI.

Parameters

map

Map controller.

navigationManager

Navigation service.

navigationViewsFactory

Factory of SwiftUI navigator controls.

mapViewsFactory

Returns

INavigationViewsFactory​

Factory of SwiftUI elements to add to the map.

Methods
func makeFinishRouteDashboardView(
map: Map,
uiModel: Model,
isExpandedPublisher: AnyPublisher<Bool, Never>
) -> AnyView

SwiftUI control with information about the end of the route.

Parameters

map

uiModel

isExpandedPublisher

Never<, >
Returns
AnyView
func makeNextManeuverView(
uiModel: Model
) -> AnyView

SwiftUI control with information about the next maneuver and the additional one.

Parameters

uiModel

Returns
AnyView
func makeRemainingRouteInfoView(
navigationManager: NavigationManager
) -> AnyView

SwiftUI control with information about the remaining distance and estimated time of arrival/remaining travel time.

Parameters

navigationManager

Returns
AnyView
func makeSpeedView(
uiModel: Model
) -> AnyView

SwiftUI control with information about the current speed, the speed limit on the current section of the route, and the warning of passing the camera coverage area.

Parameters

uiModel

Returns
AnyView
func makeThermometerView(
uiModel: Model, isLeftSide: Bool
) -> AnyView

SwiftUI control for displaying vehicle speeds and traffic events on the route.

Parameters

uiModel

isLeftSide

Returns
AnyView
func makeMessageBarView(
uiModel: Model,
onVisibilityChanged: @escaping (Bool) -> Void
) -> AnyView

SwiftUI element for displaying error messages during route building.

Parameters

uiModel

Returns
AnyView
func makeBetterRouteView(
uiModel: Model,
onVisibilityChanged: @escaping (Bool) -> Void
) -> AnyView

SwiftUI element for selecting a "better route".

Parameters

uiModel

Returns
AnyView
func makeMiniMapView(
navigationManager: NavigationManager,
miniMapFactory: IMapFactory
) throws -> AnyView

SwiftUI element for displaying a route as a mini-map.

Parameters

navigationManager

miniMapFactory

Returns
AnyView
func makeFinishRouteDashboardView(
map: Map,
uiModel: Model
) -> AnyView
Parameters

map

uiModel

Returns
AnyView

INavigatorFollowManager​

Wrapper for switching tracking modes in the navigator.

Methods
func setFollowMode(_ mode: NavigatorFollowMode)
Parameters
func addFollowModeObserver(_ observer: @escaping FollowModeObserver) -> INavigatorFollowManagerObservation
Parameters

observer

FollowModeObserver
Returns
Properties

INavigatorFollowManagerObservation​

Methods
func invalidate()

INextManeuverUIControl​

UI control with information about the next and additional maneuvers.

Properties

var onDidRequestLayout​

(() -> ())?

Signal about the need to update the layout.

InstallFallback​

Behavior in case of an error during package installation or update.

Methods
nonisolated func process(
targetPackage: Package
)
Parameters

targetPackage

IRoadEventCreatorUIView​

Interface for creating a road event.

Properties

var visibleAreaEdgeInsets​

Visible area based on the size of the card for creating a road event.

var visibleAreaEdgeInsetsChangedCallback​

((UIEdgeInsets) -> ())?

Callback closure when the visible area changes.

var cancelButtonCallback​

(() -> ())?

Callback closure when clicking the cancel button.

var createRoadEventRequestCallback​

((Result<AddEventResult, any Error>) -> ())?

Callback closure with the result of a road event creating.

IRoadEventInfoUIView​

UI control of the road event card.

Methods
func setRoadEvent(_ roadEvent: RoadEvent)

Updates the card contents with data from a new road event.

Parameters

roadEvent

Road event.

Properties

var closeButtonCallback​

(() -> ())?

Callback closure when clicking the close button.

var roadEventActionResultCallback​

((Result<(type: RoadEventActionType, result: ActionResult), any Error>) -> ())?

Callback closure when the traffic event action is completed.

var removeRoadEventActionResultCallback​

((Result<ActionResult, any Error>) -> ())?

Callback closure when the traffic event action is completed.

IRoadEventUIViewFactory​

Factory of a UIKit control of a road event card.

Methods
func makeRoadEventInfoUIView(_ roadEvent: RoadEvent) -> IRoadEventInfoUIView

Road event card.

Parameters

roadEvent

Road event.

Returns
func makeRoadEventCreatorUIView(map: Map) -> IRoadEventCreatorUIView

Creates a road event.

Parameters

IRoadEventViewFactory​

SwiftUI factory of a road event card.

Methods
func makeRoadEventInfoView(_ roadEvent: RoadEvent) -> RoadEventInfoView

Road event card.

Parameters

roadEvent

Road event.

Returns
func makeRoadEventCreatorView(
map: Map,
visibleAreaEdgeInsets: Binding<EdgeInsets>?
) -> RoadEventCreatorView

SwiftUI element for creating a road event.

Parameters

IRouteCardViewFactory​

Methods
func make(
route: TrafficRoute,
transportMode: TransportMode?,
onStartNavigation: IRouteEditorViewFactory.StartNavigationCallback?,
index: Int,
theme: RouteCardViewTheme
) -> AnyView
Parameters

route

transportMode

onStartNavigation

StartNavigationCallback.?

index

theme

Returns
AnyView

IRouteDetailsUIView​

Route details card.

Properties

var isScrollEnabled​

Whether scrolling is enabled in the route card.

var contentSize​

Size of a route card content.

IRouteEditorErrorViewFactory​

Methods
func makeErrorView(routesInfo: RouteEditorRoutesInfo?) -> AnyView
Parameters

routesInfo

Returns
AnyView

IRouteEditorFactory​

Map data source designer.

Methods
func createRouteEditorSource() -> RouteEditor

Creates a route editor.

IRouteEditorViewFactory​

Factory of SwiftUI controls of a route selection screen.

Methods
func makeTrafficRouterBriefInfoProvider(
trafficRouter: TrafficRouter,
transportModeOptionsProvider: ITransportModeOptionsProvider
) -> IBriefInfoProvider
Parameters

trafficRouter

transportModeOptionsProvider

Returns
func makeActiveRouteBriefInfoProvider() -> IBriefInfoProvider
func makeDefaultRouteCardViewFactory() -> IRouteCardViewFactory
func makeDefaultTransportModeTabViewFactory(
routeEditor: RouteEditor,
briefInfoProvider: IBriefInfoProvider
) -> ITransportModeTabViewFactory
Parameters
func makeRouteEditorView(
routeEditor: RouteEditor,
availableTransportModes: [TransportMode],
transportModeOptionsProvider: ITransportModeOptionsProvider?,
briefInfoProvider: IBriefInfoProvider?,
routeSearchPointViewFactory: IRouteSearchPointViewFactory?,
routeCardViewFactory: IRouteCardViewFactory?,
transportModeTabViewFactory: ITransportModeTabViewFactory?,
startNavigationCallback: StartNavigationCallback?,
closeCallback: CloseCallback?,
editRoutePointsCallBack: EditRoutePointsCallBack?,
errorViewFactory: IRouteEditorErrorViewFactory?
) -> RouteEditorView
Parameters

routeEditor

availableTransportModes

transportModeOptionsProvider

briefInfoProvider

routeSearchPointViewFactory

routeCardViewFactory

transportModeTabViewFactory

startNavigationCallback

StartNavigationCallback?

closeCallback

CloseCallback?

editRoutePointsCallBack

EditRoutePointsCallBack?

errorViewFactory

Returns
func makeTrafficRouterBriefInfoProvider(
trafficRouter: TrafficRouter
) -> IBriefInfoProvider
Parameters
func makeRouteEditorView(
routeEditor: RouteEditor,
briefInfoProvider _: IBriefInfoProvider? = nil,
startNavigationCallback: StartNavigationCallback?,
closeCallback: CloseCallback?,
editRoutePointsCallBack: EditRoutePointsCallBack?
) -> RouteEditorView
Parameters

routeEditor

_

startNavigationCallback

StartNavigationCallback?

closeCallback

CloseCallback?

editRoutePointsCallBack

EditRoutePointsCallBack?
Returns

IRouteListUIView​

Route preview list.

Properties

var isScrollEnabled​

Whether scrolling is enabled in the route list.

var contentSize​

Size of a route list content.

var trafficRouteSelectedCallback​

((TrafficRoute) -> ())?

Callback closure when the map visible area changes.

IRouteSearchPointViewFactory​

Methods
func provideStartPointView(point: RoutePointUI) -> AnyView
Parameters

point

Returns
AnyView
func provideFinishPointView(point: RoutePointUI) -> AnyView
Parameters

point

Returns
AnyView
func provideIntermediatePointView(point: RoutePointUI, index: Int) -> AnyView
Parameters

point

index

Returns
AnyView

IRouteUIView​

Route card preview.

Properties

var route​

IRoutingViewsFactory​

Factory of SwiftUI controls for route building.

Methods
func makeRouteEditorViewFactory() -> IRouteEditorViewFactory

Creates a factory of SwiftUI controls for route selection screen.

ISDKError​

Prorocol for all MobileSDK exceptions.

ISearchManagerFactory​

A search engine factory with different data sources.

Methods
func makeOnlineManager() throws -> SearchManager?

Creates a search engine working online.

func makeOfflineManager() throws -> SearchManager?

Creates a search engine working with preloaded data.

func makeSmartManager() throws -> SearchManager?

Creates a search engine working online or with preloaded data depending on the availability of internet connection.

ISearchResultItemViewFactory​

Methods
func makeTitleView() -> AnyView
Returns
AnyView
func makeSubtitleView() -> AnyView
Returns
AnyView
func makeRatingView() -> AnyView
Returns
AnyView
func makeDistanceView() -> AnyView
Returns
AnyView
func makeAddressView() -> AnyView
Returns
AnyView
func makeAttributesView() -> AnyView
Returns
AnyView
func makeChargingStationView() -> AnyView
Returns
AnyView
func makeAlertView() -> AnyView
Returns
AnyView

ISourceFactory​

Map data source designer.

Methods
func createOnlineDGISSource() -> Source

Creates a source that receives data from 2GIS servers.

Returns
func createGeometryMapObjectSourceBuilder() -> GeometryMapObjectSourceBuilder

Creates a data source with overlaid objects (for example, markers).

func createImmersiveDgisSource() -> Source

Creates a source with immersive data.

Returns
func createReliefSource() -> Source

Creates a source with relief data.

Returns
func createOfflineDGISSource() -> Source

Creates a source that uses preloaded 2GIS data.

Returns
func createHybridDGISSource() -> Source

Creates a source that uses data from 2GIS servers and preloaded 2GIS data.

Returns
func createRouteEditorSource(routeEditor: RouteEditor) -> RouteEditorSource

Creates a source of data for route editing.

Parameters

IStyleFactory​

Style download tool interface.

Methods
func setAttribute(name: String, value: AttributeValue) -> Self
Parameters
func loadDefault() -> Future<Style>

Gets a preset style.

func loadFile(path: String) -> Future<Style>
Parameters

path

func loadFile(url: URL) -> Future<Style>

Loads a custom style from a specified file via URL. The URL must follow the “file:” scheme, otherwise an error is returned.

Parameters

url

URL
func loadResource(name: String, bundle: Bundle) -> Future<Style>

Loads a custom style by name from a specified package.

Parameters

name

bundle

Bundle

IThermometerUIControl​

Properties

ITransportModeOptionsProvider​

Methods
func provide(_ type: TransportMode) -> RouteSearchOptions
Parameters

ITransportModeTabViewFactory​

Factory of a SwiftUI control of a route type switcher.

Methods
func make(
transportMode: TransportMode,
theme: RouteTabViewTheme
) -> AnyView
Parameters

transportMode

theme

Returns
AnyView

IVoiceAssistantService​

Methods
func requestPermission(completion: @escaping @Sendable (VoicePermissionState) -> Void)
func startRecognition(
progress: @escaping ((VoiceRecognitionState) -> Void),
completion: @escaping ((VoiceRecognitionResult) -> Void)
)
func abortRecognition()

LogSink​

Logging receiver.

Methods
nonisolated func write(
message: LogMessage
)
Parameters

message

RoadEventFilter​

Filter of displayed road events.

Methods
nonisolated func passes(
event: RoadEventFilterData
) -> Bool
Parameters

SearchHistoryKeyStrategy​

Strategy for creating a key for a search history item. The key determines the uniqueness of the record in history.

Methods
nonisolated func create(
item: SearchHistoryItem
) -> String
Parameters

SimpleClusterRenderer​

Customizes the appearance of a cluster in the IMapObjectManager.

Methods
nonisolated func renderCluster(
cluster: SimpleClusterObject
) -> SimpleClusterOptions
Parameters

StyleZoomToTiltRelation​

Object to describe the dependence of the camera angle on the style zoom level.

Methods
nonisolated func styleZoomToTilt(
styleZoom: StyleZoom
) -> Tilt
Parameters

styleZoom

Returns