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.
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.
var visibleAreaEdgeInsets
Visible area given the size of the road event creation card.
var visibleAreaEdgeInsetsChangedCallback
Callback closure when the visible area changes.
var cancelButtonCallback
Callback closure when the cancel button is pressed.
var createRoadEventRequestCallback
Closing the callback with a road event creation result.
IDoubleTapAndPanGestureRecognizer
IEnergyConsumption
Protocol for setting the power saving of the device.
func setFpsCallback(_ fpsCallback: FpsCallback?)
Set the callback function for changing fps.
fpsCallback
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.
request
HTTP request.
callback
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.
locationCallback
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.
availabilityCallback
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.
accuracy
var lastLocation
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.
var lastLocation
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.
headingCallback
Callback function to update the current direction. See method CLLocationManagerDelegate.locationManager(didUpdateHeading:).
availabilityCallback
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.
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 mapView
Card layer. Can only be read from the main queue.
var gestureView
Gesture processing layer. The initialMapOptions.gestureViewFactory property is responsible for creating the layer. Can only be read from the main queue.
var mapEventProcessor
Map gesture handler.
var mapCoordinateSpace
Map coordinates space.
var mapControlFactory
A factory of standard map controls using 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 markerViewOverlay
Object for working with UIView markers on the map.
IMapGestureView
Default map gesture recognizers.
var doubleTapGestureRecognizer
Double tap recognizer. Used to zoom in on the map (zoom out) with a fixed factor.
var panGestureRecognizer
Drag recognizer. Used to move the map in the plane. By default, it recognizes drag with exactly one touch point.
var twoFingerPanGestureRecognizer
Two-finger drag. Used to tilt the map three-dimensionally relative to the horizon.
var rotationGestureRecognizer
Map rotation gesture in the plane.
var pinchGestureRecognizer
Change of scale by pinching.
var twoFingerTapGestureRecognizer
Short touch with two fingers. Used to move the map away (zoom in) by a fixed factor.
var doubleTapAndPanGestureRecognizer
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.
callback
func addObjectLongPressCallback(callback: MapObjectTappedCallback)
callback
func removeObjectTappedCallback(callback: MapObjectTappedCallback)
Remove the callback function that was called upon a click or a long click on the map.
callback
func removeLongPressCallback(callback: MapObjectTappedCallback)
callback
var gestureView
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.
var appearance
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.
var showsAPIVersion
Whether to show the API version in copywriting. By default false.
var copyrightAlignment
Default is bottomRight.
var copyrightInsets
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.
var urlOpener
Custom URL opening handler on tap to copywriting.
IMarkerView
UIView marker protocol.
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.
INavigationControlView
Navigator UI element.
INavigationMapControlsFactory
Map controllers factory in the navigator.
var followManager
Current object for switching tracking modes in the navigator.
INavigationView
var visibleAreaEdgeInsets
Visible area of the map, taking into account the navigator interface.
var visibleAreaEdgeInsetsChangedCallback
Closing the callback when the visible area of the map changes.
var finishButtonCallback
Closing the callback when you press the End Route button.
INavigationViewControlsFactory
Navigator controls factory.
INavigationViewFactory
Navigator UI Factory.
INavigatorFollowManager
Wrapper for switching tracking modes in the navigator.
INavigatorFollowManagerObservation
INextManeuverControlView
UI element with information about the next maneuver and additional maneuver.
var onDidRequestLayout
Signal to update the layout.
IPositioningServicesFactory
Positioning services factory. All constructed object methods must be called in the positioningQueueue queue, unless otherwise specified.
IRoadEventCardView
Road event card protocol.
func setRoadEvent(_ roadEvent: RoadEvent)
Update the card content with the data of a new road event.
roadEvent
Road event.
var closeButtonCallback
Closing callback when the close button is clicked.
var roadEventActionResultCallback
Closing the callback when the processing of a traffic event action is completed.
var removeRoadEventActionResultCallback
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.
var route
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
Query for a search hint in a directory.
func search(
query: SearchQuery
) -> Future<SearchResult>
Get the directory objects that match this query.
query
Query for directory search prompts.
func searchById(
id: String
) -> Future<DirectoryObject?>
Get a directory object by its string identifier.
id
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.
objectId
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.
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.
url
func loadResource(name: String, bundle: Bundle) -> Future<Style>
Load a custom style by name from a specified package.
IThermometerControlView
var eventsPosition
LogSink
Logging receiver.
SimpleClusterRenderer
A class for customizing the appearance of a cluster in the IMapObjectManager.
func renderCluster(
cluster: SimpleClusterObject
) -> SimpleClusterOptions