interface
CameraMoveController
Class to control the position of the camera for animation needs
The class must be thread-safe.
func animationTime() -> TimeInterval
CustomFollowController
An 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 satelliteBearing() -> Bearing?
func magneticBearing() -> Bearing?
func tilt() -> Tilt?
func styleZoom() -> StyleZoom?
func accuracy() -> Double?
IAudioSettings
Interface for changing sound settings.
Mute all sounds of other applications.
Sound volume level.
IBatteryManagerDelegate
Battery tracking control methods. The implementation can turn battery tracking on and off by changing UIDevice.isBatteryMonitoringEnabled.
func startBatteryMonitoring()
Request to start battery status tracking by setting UIDevice.current.isBatteryMonitoringEnabled to true. If UIDevice.current.isBatteryMonitoringEnabled is already true, changing the status is not necessary. If enabling tracking is undesirable, the implementation can be empty.
func stopBatteryMonitoring()
Request to disable battery status tracking by setting UIDevice.current.isBatteryMonitoringEnabled to true. If UIDevice.current.isBatteryMonitoringEnabled is already false, changing the status is not necessary. If battery tracking must be continued, the value of isBatteryMonitoringEnabled can be left unchanged.
ICancellable
Token to cancel the operation, at the start of which it was received.
func cancel()
ICreateRoadEventView
Traffic event creation interface protocol.
Visible area given the size of the road event creation card.
Callback closure when the visible area changes.
Callback closure when the cancel button is pressed.
Closing the callback with a road event creation result.
IDoubleTapAndPanGestureRecognizer
Number of vertical shift points, resulting in twice the scale change.
IEnergyConsumption
Protocol for setting the power saving of the device.
func setFpsCallback(_ fpsCallback: FpsCallback?)
Set the callback function for changing fps.
IHTTPClient
Network client interface for sending HTTP requests.
func send(
request: URLRequest,
callback: @escaping RequestDataCompletionCallback
)
Function for sending a request and getting the result through the callback. The results will be processed in the callback.
HTTP request.
Callback function when receiving the result of a request.
IImageFactory
func make(pngData: Data, size: CGSize) -> Image
Create an image based on PNG data.
func make(svgData: Data, size: CGSize) -> Image
Create an image based on SVG data.
func make(lottieData: Data, size: CGSize) -> Image
Create an animated image based on Lottie data.
func make(image: UIImage) -> Image
Create an image based on the UIImage object. The make(pngData:size:) method works better if you have ready PNG data.
func make(imageFactory: @escaping () -> UIImage) -> Image
Create an image based on a pending UIImage object. The passed closure is called with a delay when the data is needed. The make(pngData:size:) method works better if you have ready PNG data.
ILocationProvider
The 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.
Callback function to update the current geoposition. If the provider is available (call availabilityCallback with value true), this source always delivers a valid geoposition. A valid geoposition is a geoposition in which all fields have a valid value at the time it was sent to this channel (i.e. if the geoposition accuracy >= half the length of the Earth's equator, then the geoposition is valid for any of the correct coordinates specified in it). If the precision value <= 0, the position is considered invalid even if isAvailable == true. See the CLLocationManagerDelegate.locationManager(didUpdateLocations:) method.
Callback function to change the availability of the geoposition source. If this function is called with the value true, all subsequent calls to locationCallback will contain a valid (up-to-date) geoposition. Even if geoposition tracking is not available, the ILocationProvider implementation can send a new geoposition, but it will be considered invalid. See the CLLocationManagerDelegate.locationManager(didFailWithError:) method.
func setDesiredAccuracy(_ accuracy: DesiredAccuracy)
Set the desired location accuracy. If the device cannot return a location with the desired accuracy, it can return a location with lower accuracy. If the platform does not provide a method similar in functionality, then this method must have an empty implementation.
The best currently known geoposition. If there is no currently known geoposition, nil is returned. The geoposition returned by this method may be invalid (see setCallbacks). This method should query the system for the best currently known geoposition and return it even if it is out of date and/or does not meet the required accuracy. If the platform API does not provide a method similar in functionality, this method should always return nil.
ILocationService
Geoposition source interface.
The best currently known geoposition. If there is no currently known geoposition, nil is returned. The geoposition returned by this method may be invalid. This method needs to request the best currently known geoposition from the system and return it even if it is out of date and/or does not meet the required accuracy. If the platform API does not provide a similarly functional method, this method will always return nil.
IMagneticHeadingProvider
A 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.
Callback function to update the current direction. See method CLLocationManagerDelegate.locationManager(didUpdateHeading:).
Callback function to change 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.
IMapControlFactory
A button factory to add to the map.
func makeZoomControl() -> ZoomControl
func makeCurrentLocationControl() -> CurrentLocationControl
func makeCompassControl() -> CompassControl
func makeTrafficControl() -> TrafficControl
func makeCreateRoadEventControl() -> CreateRoadEventControl
func makeIndoorControl(_ options: IndoorControlOptions) -> IndoorControl
func makeIndoorControl(_ options: IndoorControlOptions = .default) -> IndoorControl
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.
Initial map settings. Not changed after map creation. Can be read from any queue.
Map and camera control. Can be accessed from any queue, but synchronization is required in case of simultaneous access.
Card layer. Can only be read from the main queue.
Gesture processing layer. The initialMapOptions.gestureViewFactory property is responsible for creating the layer. Can only be read from the main queue.
Map gesture handler.
Map coordinates space.
A factory of standard map controls using inline style.
Map image capture tool. Images are made based on the current state. Can be read from any queue.
An object for adjusting the power saving of a device.
Object for working with UIView markers on the map.
IMapGestureView
Default map gesture recognizers.
Double tap recognizer. Used to zoom in on the map (zoom out) with a fixed factor.
Drag recognizer. Used to move the map in the plane. By default, it recognizes drag with exactly one touch point.
Two-finger drag. Used to tilt the map three-dimensionally relative to the horizon.
Map rotation gesture in the plane.
Change of scale by pinching.
Short touch with two fingers. Used to move the map away (zoom in) by a fixed factor.
Double tap followed by a shift. Used to control map scale.
IMapGestureViewFactory
Gesture processing layer factory. All methods are called only on the main queue.
func makeGestureView(
map: Map,
coordinateSpace: IMapCoordinateSpace
) -> UIView & IMapGestureView
Create a gesture processing layer.
func makeGestureView(
map: Map,
eventProcessor: IMapEventProcessor,
coordinateSpace: IMapCoordinateSpace
) -> UIView & IMapGestureView
Create a gesture processing layer.
func makeGestureView(
map: Map,
coordinateSpace: IMapCoordinateSpace
) -> UIView & IMapGestureView
Create a gesture processing layer.
func makeGestureView(
map: Map,
eventProcessor: IMapEventProcessor,
coordinateSpace: IMapCoordinateSpace
) -> UIView & IMapGestureView
Create a gesture processing layer.
IMapSnapshotter
Map image capture tool.
func makeImage(
scale: CGFloat,
orientation: UIImage.Orientation
) -> Future<UIImage>
Get an image of the map based on its current state. Can be called from any queue. The value is returned to Future on an undefined queue.
func makeImage(
scale: CGFloat = 1,
orientation: UIImage.Orientation = .up
) -> Future<UIImage>
Get an image of the map based on its current state. Can be called from any queue. The value is returned to Future on an undefined queue.
IMapView
Map layer protocol.
func addObjectTappedCallback(callback: MapObjectTappedCallback)
Add a callback function that will be called upon a click or a long click on the map.
func addObjectLongPressCallback(callback: MapObjectTappedCallback)
func removeObjectTappedCallback(callback: MapObjectTappedCallback)
Remove the callback function that was called upon a click or a long click on the map.
func removeLongPressCallback(callback: MapObjectTappedCallback)
An additional layer placed over the entire map surface. Used for intercepting gestures. If you replace this layer with another, you must also implement the sending of map events through IMapEventProcessor. If nil is set, the built-in gesture processing will stop.
Set the active set of current style themes and the ability to switch themes automatically depending on the environment. If .automatic is selected, the card will switch to the selected theme pair based on the current display (light or dark). This feature has been available since iOS 13. If .universal is selected, only one active theme in any environment is used. This feature is available for iOS 13 or lower.
Whether to show the API version in copywriting. By default false.
Default is bottomRight.
Copywriter's indentation from map borders. The default is .zero. The safeAreaInsets of the map view are taken into account when positioning. Indentation values must not be negative.
Custom URL opening handler on tap to copywriting.
IMarkerView
UIView marker protocol.
Marker ID.
Point on the map to which the anchoring is performed.
User handler when tapping into the UIView marker.
IMarkerViewFactory
Factory for creating UIView markers.
func make(
/// Отображение маркера.
view: UIView,
/// Точка на карте, к которой осуществляется привязка.
position: GeoPointWithElevation,
/// Относительная точка на View, к которой осуществяется привязка.
anchor: Anchor,
/// Дополнительное смещение в пикселях по оси X.
offsetX: CGFloat,
/// Дополнительное смещение в пикселях по оси Y.
offsetY: CGFloat
) -> IMarkerView
Create a marker.
IMarkerViewOverlay
Protocol for working with UIView markers on the map.
func removeAll()
Remove all markers.
INativeScaleProvider
Protocol describing the point-to-pixel conversion.
Multiplier for conversion to pixels. If no map exists, the value is 1. Can only be accessed from the main queue.
Point-to-pixel conversion matrix. The x and y multiplier is equal to nativeScale.
INavigationControlView
Navigator UI element.
Element visibility.
Item visibility change signal.
INavigationMapControlsFactory
Map controllers factory in the navigator.
func makeTrafficAndParkingMapControl() -> UIControl
UI element to turn on/off the display of traffic jams and parking spaces.
func makeIndoorControl() -> IndoorControl
UI element to switch floors in the floor plan.
Current object for switching tracking modes in the navigator.
INavigationView
Visible area of the map, taking into account the navigator interface.
Closing the callback when the visible area of the map changes.
Closing the callback when you press the End Route button.
INavigationViewControlsFactory
Navigator controls factory.
func makeNextManeuverControl(
uiModel: Model
) -> UIView & INextManeuverControlView
UI element with information about the next maneuver and the additional one.
func makeSpeedControl(
uiModel: Model
) -> (UIView & INavigationControlView)
UI element 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.
func makeRemainingRouteInfoControl(
navigationManager: NavigationManager
) -> UIView & INavigationControlView
UI element with information about the remaining distance and the approximate time of arrival/remaining travel time.
func makeMessageBarControl(
uiModel: Model
) -> UIView & INavigationControlView
UI element for displaying navigation status messages, such as route search and GPS signal loss.
func makeBetterRouteControl(
uiModel: Model
) -> UIView & INavigationControlView
UI element to switch to a route with a shorter expected arrival time.
INavigationViewFactory
Navigator UI Factory.
func makeRouteListView(_ routes: [TrafficRoute]) -> IRouteListView
Create the UI of a routes preview list.
func makeRouteView(_ route: TrafficRoute) -> IRouteView
Create the UI of a route preview.
func makeRouteDetailsView(
_ route: TrafficRoute,
startName: String?,
finishName: String?
) -> IRouteDetailsView
Create the UI of route details.
Route.
Name of the start point of the route.
Name of the end point of the route.
INavigatorFollowManager
Wrapper for switching tracking modes in the navigator.
func toggleFollowMode()
Switches the follow mode to the next one available.
func addFollowModeObserver(_ observer: @escaping FollowModeObserver) -> INavigatorFollowManagerObservation
INavigatorFollowManagerObservation
func invalidate()
INextManeuverControlView
UI element with information about the next maneuver and additional maneuver.
Signal to update the layout.
IPositioningServicesFactory
Positioning services factory. All constructed object methods must be called in the positioningQueueue queue, unless otherwise specified.
Geo-positioning source interface. If nil, SDK geopositioning functions are unavailable.
Magnetic orientation source interface. If nil, the SDK's magnetic orientation functions are unavailable.
IRoadEventCardView
Road event card protocol.
func setRoadEvent(_ roadEvent: RoadEvent)
Update the card content with the data of a new road event.
Road event.
Closing callback when the close button is clicked.
Closing the callback when the processing of a traffic event action is completed.
Closing the callback when the processing of a traffic event action is completed.
IRoadEventCardViewFactory
Road event vard factory.
func makeRoadEventCardView(_ roadEvent: RoadEvent) -> IRoadEventCardView
Road event card.
func makeCreateRoadEventView(map: Map) -> ICreateRoadEventView
Interface for creating a road event.
IRouteDetailsView
Route detail card protocol.
IRouteEditorFactory
Map data source designer.
IRouteListView
Route preview list protocol.
IRouteView
Route card preview protocol.
Route.
ISDKError
Prorocol for all MobileSDK exceptions.
ISearchManager
Search engine. Main entry point for the reference API.
func suggest(
query: SuggestQuery
) -> Future<SuggestResult>
Get hints that match this query.
Query for a search hint in a directory.
func search(
query: SearchQuery
) -> Future<SearchResult>
Get the directory objects that match this query.
Query for directory search prompts.
func searchById(
id: String
) -> Future<DirectoryObject?>
Get a directory object by its string identifier.
Directory string identifier. A complex identifier, which is obtained as a result of a WebAPI query, is possible.
func searchByDirectoryObjectId(
objectId: DgisObjectId
) -> Future<DirectoryObject?>
Get a directory object by its identifier.
Object identifier in a directory.
ISearchManagerFactory
A search engine factory with different data sources.
func makeOnlineManager() throws -> ISearchManager?
Create a search engine working online.
func makeOfflineManager() throws -> ISearchManager?
Create a search engine working with preloaded data.
func makeSmartManager() throws -> ISearchManager?
Create a search engine working online or with preloaded data depending on the availability of internet connection.
ISourceFactory
Map data source designer.
func createOnlineDGISSource() -> Source
Create a source that receives data from 2GIS servers.
func createGeometryMapObjectSourceBuilder() -> GeometryMapObjectSourceBuilder
Create a data source with overlaid objects (for example, markers).
func createHybridDGISSource() -> Source
Create a source that uses data from 2GIS servers and preloaded 2GIS data.
func createRouteEditorSource(routeEditor: RouteEditor) -> RouteEditorSource
Create a source of data for route editing.
IStyleFactory
Style download tool interface.
func setAttribute(name: String, value: AttributeValue) -> Self
func loadDefault() -> Future<Style>
Getting a preset style.
func loadFile(path: String) -> Future<Style>
Load a custom style from a specified file on the absolute path.
func loadFile(url: URL) -> Future<Style>
Load a custom style from a specified file by URL. The URL must follow the “file:” pattern, otherwise an error will be returned.
func loadResource(name: String, bundle: Bundle) -> Future<Style>
Load a custom style by name from a specified package.
IThermometerControlView
LogSink
Logging receiver.
SimpleClusterRenderer
A class for customizing the appearance of a cluster in the IMapObjectManager.
func renderCluster(
cluster: SimpleClusterObject
) -> SimpleClusterOptions