interface
CameraMoveController
Allows you to control the camera position for animation needs
The class must be thread-safe.
func animationTime() -> 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.
func availableValues() -> FollowValueOptionSet
func coordinates() -> GeoPoint?
func bearing() -> Bearing?
func tilt() -> Tilt?
func styleZoom() -> StyleZoom?
ICancellable
Token to cancel the operation, at the start of which it was obtained.
func cancel()
IDirectoryViewsFactory
Factory of directory SwiftUI elements.
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.
IDoubleTapAndPanGestureRecognizer
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.
func setFpsCallback(_ fpsCallback: FpsCallback?)
Sets the callback function for changing FPS.
fpsCallback
IHTTPClient
Network client interface for sending HTTP requests.
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.
request
HTTP request.
callback
Callback function when obtaining the result of a request.
IImageFactory
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.
ILocationProvider
Geoposition source interface that the platform implements.
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.
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
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 \ .
accuracy
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.
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.
headingCallback
Callback function to update the current direction. See the CLLocationManagerDelegate.locationManager(didUpdateHeading:) method.
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).
IMapFactory
Matching map object factory.
var initialMapOptions
Initial map settings. Not changed after map creation. 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 mapUIView
Map layer. Can be read only from the main queue.
var mapView
Card layer. Can only be read from the main queue.
var gestureUIView
Gesture processing layer using the initialMapOptions.gestureViewFactory property. Can only be read from the main queue.
var mapEventProcessor
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
Map coordinates space.
var mapUIControlsFactory
Factory of standard UI map controls using the inline style.
var mapViewsFactory
Factory of standard SwiftUI map controls using the inline style.
var snapshotter
Map image capture tool. Images are made based on the current state. Can be read from any queue.
var energyConsumption
An object for adjusting the power saving of a device.
var markerOverlayUIView
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.
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
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.
@available(*, deprecated, message: "Please use makeGestureView(map:eventProcessor:coordinateSpace:)")
func makeGestureUIView(
map: Map,
coordinateSpace: IMapCoordinateSpace
) -> UIView & IMapGestureUIView
func makeGestureUIView(
map: Map,
eventProcessor: IMapEventProcessor,
coordinateSpace: IMapCoordinateSpace
) -> UIView & IMapGestureUIView
@available(*, deprecated, message: "Please use makeGestureView(map:eventProcessor:coordinateSpace:)")
func makeGestureUIView(
map: Map,
coordinateSpace: IMapCoordinateSpace
) -> UIView & IMapGestureUIView
func makeGestureUIView(
map: Map,
eventProcessor: IMapEventProcessor,
coordinateSpace: IMapCoordinateSpace
) -> UIView & IMapGestureUIView
Creates a gesture processing layer.
IMapSnapshotter
Map image capture tool.
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.
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.
IMapUIControlsFactory
Factory of UI map controls.
func makeZoomUIControl() -> ZoomUIControl
func makeCurrentLocationUIControl() -> CurrentLocationUIControl
func makeCompassUIControl() -> CompassUIControl
func makeTrafficUIControl() -> TrafficUIControl
func makeRoadEventCreatorButtonUIControl() -> RoadEventCreatorButtonUIControl
func makeIndoorUIControl(_ options: IndoorUIControlOptions) -> IndoorUIControl
func makeIndoorUIControl(_ options: IndoorUIControlOptions = .default) -> IndoorUIControl
IMapUIView
Map layer.
func addObjectTappedCallback(callback: MapObjectTappedCallback)
Adds a callback function that is called after a long tap on the map.
callback
func addObjectLongPressCallback(callback: MapObjectTappedCallback)
callback
func removeObjectTappedCallback(callback: MapObjectTappedCallback)
Removes a callback function that is called after a long tap on the map.
callback
func removeLongPressCallback(callback: MapObjectTappedCallback)
callback
var gestureUIView
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 appearance
Sets the active theme set of the current style and enables automatic theme switching depending on the environment. If the .automatic value is set, the map switches between light and dark themes depending on system settings. Only available for iOS 13 and later. For iOS 13 and earlier, the .universal value is available, which uses only one active theme in any environment.
var showsAPIVersion
Whether to show an API version in a copyright. The default value is false.
var copyrightAlignment
Sets a copyright position on the map. The default value is bottomRight.
var copyrightInsets
Sets copyright paddings from map edges. The default value is .zero. During positioning, safeAreaInsets are considered. Values cannot be negative.
var urlOpener
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.
func makeCurrentLocationView() -> AnyView
func makeZoomView() -> AnyView
func makeTrafficView(colors: TrafficViewColors) -> AnyView
func makeIndoorView() -> AnyView
func makeCompassView(icon: UIImage?, highlightedIcon: UIImage?) -> AnyView
func makeMiniMapView(mapFactory: IMapFactory) throws -> AnyView
func makeRoadEventCreatorButtonView(callback: (() -> Void)?) -> AnyView
func makeCompassView() -> AnyView
IMarkerOverlayUIView
Managing UIView markers on the map.
func removeAll()
Removes all markers.
IMarkerUIView
UIView marker.
IMarkerUIViewFactory
Factory for creating UIView markers.
func make(
/// Отображение маркера.
view: UIView,
/// Точка на карте, к которой осуществляется привязка.
position: GeoPointWithElevation,
/// Относительная точка на View, к которой осуществяется привязка.
anchor: Anchor,
/// Дополнительное смещение в пикселях по оси X.
offsetX: CGFloat,
/// Дополнительное смещение в пикселях по оси Y.
offsetY: CGFloat
) -> IMarkerUIView
Creates a marker.
IModelFactory
func make(modelData: Data) -> ModelData
Creating a model based on binary data.
INativeScaleProvider
Protocol describing the point-to-pixel conversion.
INavigationMapUIControlsFactory
Factory of UI map controls in the navigator.
var followManager
Current object for switching tracking modes in the navigator.
INavigationMapViewsFactory
Factory of map SwiftUI controls in the navigator.
INavigationUIControl
Navigator UI control.
INavigationUIControlsFactory
Factory of UI navigator controls.
INavigationUIView
INavigationUIViewFactory
Factory of UI navigator controls.
INavigationViewFactory
Navigator UI factory.
INavigationViewsFactory
Factory of SwiftUI elements to add to the map.
INavigatorFollowManager
Wrapper for switching tracking modes in the navigator.
INavigatorFollowManagerObservation
INextManeuverUIControl
UI control with information about the next and additional maneuvers.
var onDidRequestLayout
Signal about the need to update the layout.
InstallFallback
Behavior in case of an error during package installation or update.
IRoadEventCreatorUIView
Interface for creating a road event.
var visibleAreaEdgeInsets
Visible area based on the size of the card for creating a road event.
var visibleAreaEdgeInsetsChangedCallback
Callback closure when the visible area changes.
var cancelButtonCallback
Callback closure when clicking the cancel button.
var createRoadEventRequestCallback
Callback closure with the result of a road event creating.
IRoadEventInfoUIView
UI control of the road event card.
func setRoadEvent(_ roadEvent: RoadEvent)
Updates the card contents with data from a new road event.
roadEvent
Road event.
var closeButtonCallback
Callback closure when clicking the close button.
var roadEventActionResultCallback
Callback closure when the traffic event action is completed.
var removeRoadEventActionResultCallback
Callback closure when the traffic event action is completed.
IRoadEventUIViewFactory
Factory of a UIKit control of a road event card.
func makeRoadEventInfoUIView(_ roadEvent: RoadEvent) -> IRoadEventInfoUIView
Road event card.
func makeRoadEventCreatorUIView(map: Map) -> IRoadEventCreatorUIView
Creates a road event.
IRoadEventViewFactory
SwiftUI factory of a road event card.
func makeRoadEventInfoView(_ roadEvent: RoadEvent) -> RoadEventInfoView
Road event card.
func makeRoadEventCreatorView(
map: Map,
visibleAreaEdgeInsets: Binding<EdgeInsets>?
) -> RoadEventCreatorView
SwiftUI element for creating a road event.
IRouteDetailsUIView
Route details card.
IRouteEditorFactory
Map data source designer.
IRouteListUIView
Route preview list.
IRouteUIView
Route card preview.
var route
Route.
ISDKError
Prorocol for all MobileSDK exceptions.
ISearchManagerFactory
A search engine factory with different data sources.
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
func makeTitleView() -> AnyView
func makeSubtitleView() -> AnyView
func makeRatingView() -> AnyView
func makeDistanceView() -> AnyView
func makeAddressView() -> AnyView
func makeAttributesView() -> AnyView
func makeChargingStationView() -> AnyView
func makeAlertView() -> AnyView
ISourceFactory
Map data source designer.
func createOnlineDGISSource() -> Source
Creates a source that receives data from 2GIS servers.
func createGeometryMapObjectSourceBuilder() -> GeometryMapObjectSourceBuilder
Creates a data source with overlaid objects (for example, markers).
func createOfflineDGISSource() -> Source
Creates a source that uses preloaded 2GIS data.
func createHybridDGISSource() -> Source
Creates a source that uses data from 2GIS servers and preloaded 2GIS data.
func createRouteEditorSource(routeEditor: RouteEditor) -> RouteEditorSource
Creates a source of data for route editing.
IStyleFactory
Style download tool interface.
func setAttribute(name: String, value: AttributeValue) -> Self
func loadDefault() -> Future<Style>
Gets a preset style.
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.
url
func loadResource(name: String, bundle: Bundle) -> Future<Style>
Loads a custom style by name from a specified package.
IThermometerUIControl
var eventsPosition
IVoiceAssistantService
func requestPermission(completion: @escaping ((VoicePermissionState) -> Void))
func startRecognition(
progress: @escaping ((VoiceRecognitionState) -> Void),
completion: @escaping ((VoiceRecognitionResult) -> Void)
)
func abortRecognition()
LogSink
Logging receiver.
SearchHistoryKeyStrategy
Strategy for creating a key for a search history item. The key determines the uniqueness of the record in history.
SimpleClusterRenderer
Customizes the appearance of a cluster in the IMapObjectManager.
func renderCluster(
cluster: SimpleClusterObject
) -> SimpleClusterOptions