class
ActivityTracker
Extends: Hashable
public static func == (lhs: ActivityTracker, rhs: ActivityTracker) -> Bool
Returns a Boolean value indicating whether two values are equal.<br/>This documentation comment was inherited from .
public convenience init(
platformContext: Context,
model: Model,
speedBound: Double = 4.2,
timeThreshold: TimeInterval = 20
)
Navigation extension that monitors user activity and gives a signal when the user has stopped using the navigator and it can be turned off.
Parameters
platformContext
Context.
model
Model of the navigator status of which is being tracked.
speedBound
Upper limit of speed in m/s, if exceeded in the Finished state of the navigator, it is considered that the navigator is active, i.e. the movement continues.
timeThreshold
TimeInterval
Time during which in the Finished state of the navigator the speed is tracked below the threshold for determining the inactive state of the navigator. If during this time the speed is less than the set threshold or there is no location and speed data, the navigator is considered inactive.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
Properties
var stopChannel
StatefulChannel<Bool>
Flag the active state of which indicates that the navigator must be stopped. If in the Finished state the navigation stops, i.e. the movement stops or its speed becomes lower than the threshold value, and if this state persists for some time, the flag is set to true, otherwise it is set to false.
var stop
Flag the active state of which indicates that the navigator must be stopped. If in the Finished state the navigation stops, i.e. the movement stops or its speed becomes lower than the threshold value, and if this state persists for some time, the flag is set to true, otherwise it is set to false.
AlternativeRouteSelector
Alternative route selection.
Extends: Hashable
public static func == (lhs: AlternativeRouteSelector, rhs: AlternativeRouteSelector) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by feeding them into the given hasher.
Parameters
hasher
Hasher
The hasher to use when combining the components of this instance.
public func selectAlternativeRoute(
trafficRoute: TrafficRoute
)
Alternative route selection. If a passed route does not equal any of the current alternative routes, nothing happens. Otherwise, a corresponding alternative route becomes the current active route.
Parameters
trafficRoute
Alternative route that must be selected as the current active route.
AlternativeRoutesProviderSettings
Settings of searching for alternative routes and a better route.
Extends: Hashable
public static func == (lhs: AlternativeRoutesProviderSettings, rhs: AlternativeRoutesProviderSettings) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
Properties
var alternativeRoutesEnabled
Flag to enable/disable the suggestion of alternative routes. By default, suggestion of alternative routes is enabled.
var betterRouteEnabled
Flag to enable/disable the suggestion of a better route. By default, the better route suggestion is enabled.
var routeSearchDelay
Delay before searching for alternative routes when starting a trip on a route or after switching to another route. Must be at least 5 seconds. The default is 20 seconds.
var betterRouteTimeCostThreshold
Minimum difference in travel time between the original route and the alternate route at which the alternate route is considered a better route.
var betterRouteLengthThreshold
Minimum cumulative length of route edges that differ between the original route and the alternate route, at which the alternate route is considered the better route.
var routerType
Type of a search engine for finding alternative routes.
AnimationSettings
Settings of map object animations. Applied to style layers with a model source specified. For example, layers of the "3D model" and "Directional model" type.
Extends: Hashable
public static func == (lhs: AnimationSettings, rhs: AnimationSettings) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by feeding them into the given hasher.
Parameters
hasher
Hasher
The hasher to use when combining the components of this instance.
Properties
var animationIndex
Int32?
Gets the index of the current model animation. If null, the value from styles is used.
var animationName
Name of the current model animation. If null, the value from styles is used. If the value is not specified in styles, the animation is not played.
var sceneIndex
Int32?
Gets the index of the current model scene. If null, the value from styles is used.
var sceneName
Gets the title of the current model scene. If null, the value from styles is used.
var animationRepeatCount
Int32?
Gets the number of the model animation repetitions. If null, the value from styles is used.
var animationSpeed
Float?
Gets the speed of playing the model animation. If null, the value from styles is used.
Attributes
Interface for managing map object attributes.
Extends: Hashable
public static func == (lhs: Attributes, rhs: Attributes) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func setAttributeValue(
name: String,
value: AttributeValue
)
Setting an attribute.
Parameters
public func setAttributeValues(
values: [String: AttributeValue],
attributesToRemove: [String] = []
)
Sets a set of attributes.
Parameters
values
String[ : ]
Set of “name”:“value” pairs for added properties.
attributesToRemove
List of property names to delete.
public func removeAttribute(
name: String
)
Removes an attribute.
Parameters
name
Name of a property to delete.
public func getAttributeValue(
name: String
) -> AttributeValue
Gets an attribute.
Parameters
Properties
var attributeNames
Retrieving a list of properties.
var changed
Channel<[String]>
Gets a channel notifying about the change of the properties.
AudioSettings
Class for managing the sound.<br/>All methods can be called from any thread.
Extends: Hashable
public static func == (lhs: AudioSettings, rhs: AudioSettings) -> Bool
Returns a Boolean value indicating whether two values are equal.<br/>This documentation comment was inherited from .
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by feeding them into the given hasher.<br/>This documentation comment was inherited from .
Parameters
hasher
Hasher
The hasher to use when combining the components of this instance.
Properties
var volume
Sound volume level (0-100).
var mute
Sound playing is disabled.
var audioFocusPolicy
Behavior of other applications sounds with the requested focus.
BaseCamera
Camera.
Extends: Hashable
public static func == (lhs: BaseCamera, rhs: BaseCamera) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func setPosition(
position: CameraPosition
) throws
Sets a new camera position.<br/>The call interrupts flyover and gesture handling, and resets the tracking mode.
Parameters
position
public func changePosition(
positionChange: CameraPositionChange
) throws
Changes only certain parameters of the camera position.<br/>The call interrupts flyover and gesture handling and resets following changed parameters. If coordinates are changed, following the style scaling level and bearing is also reset.
Parameters
positionChange
public func setZoomRestrictions(
zoomRestrictions: CameraZoomRestrictions
) throws
Sets a new range of zoom level limits.
Parameters
zoomRestrictions
New range of zoom-level restrictions.
public func setPositionPoint(
positionPoint: CameraPositionPoint
) throws
Sets the new position relative to the area of the screen limited by the paddings.
Parameters
positionPoint
New position relative to the area of the screen bounded by the paddings.
public func setViewPoint(
viewPoint: CameraViewPoint?
) throws
Sets the new viewpoint relative to the full size of the map viewport.
Parameters
viewPoint
New viewpoint relative to the full size of the map viewport. If nil is passed, follows the point of camera position.
Properties
var projection
Projection.
var positionChannel
StatefulChannel<CameraPosition>
Gets the current camera position.
var position
Gets the current camera position.
var zoomRestrictionsChannel
StatefulChannel<CameraZoomRestrictions>
Gets the current zoom level limits.
var zoomRestrictions
Gets the current zoom level limits.
var deviceDensityChannel
StatefulChannel<DeviceDensity>
Gets the DPI ratio to the base DPI of the device.
var deviceDensity
Gets the DPI ratio to the base DPI of the device.
var sizeChannel
StatefulChannel<ScreenSize>
Gets the viewport size.
var size
Gets the viewport size.
var paddingChannel
StatefulChannel<Padding>
Gets the current padding from the edges of the screen.
var padding
Gets the current padding from the edges of the screen.
var positionPointChannel
StatefulChannel<CameraPositionPoint>
Screen point to which the camera position is anchored is set with the padding.
var positionPoint
Screen point to which the camera position is anchored is set with the padding.
var viewPoint
Viewpoint relative to the full size of the map viewport.
var visibleArea
Intersection area between the camera's visibility pyramid and the map surface.
var visibleRectChannel
StatefulChannel<GeoRect>
Volume rectangle of the visible area of the map.
var visibleRect
Volume rectangle of the visible area of the map.
var maxTiltRestrictionChannel
StatefulChannel<StyleZoomToTiltRelation?>
Gets the current function of the dependence of the maximum camera tilt angle on the style zoom level.
var maxTiltRestriction
Gets the current function of the dependence of the maximum camera tilt angle on the style zoom level.
var viewportRestrictionChannel
StatefulChannel<GeoRect?>
Gets the viewport restrictions.
var viewportRestriction
Gets the viewport restrictions.
BearingFollowController
Controller following the map bearing.
Extends: FollowController
public convenience init(
bearingSource: BearingSource,
animationDuration: TimeInterval = 1,
valueThreshold: Bearing = Bearing(value: 1)
)
Creates a controller following the map bearing.
Parameters
bearingSource
Source of bearing information.
animationDuration
TimeInterval
Non-negative duration of changing the actual bearing.
valueThreshold
Non-negative threshold of changing the actual bearing taken into account.
BoolRouteLongAttribute
Container that stores an extended route attribute. Each element is stored as a pair consisting of a point and an attribute element value. The action of the attribute starts at the given point and ends at the next point, starting from which the action of the attribute of the next element begins.
Extends: Hashable
public static func == (lhs: BoolRouteLongAttribute, rhs: BoolRouteLongAttribute) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func entry(
point: RoutePoint
) -> BoolRouteLongEntry?
Element in which the point falls.
Parameters
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [BoolRouteLongEntry]
Elements partially or completely covered by the [begin, end] segment.
Parameters
Properties
var size
Number of elements.
var isEmpty
Elements missing.
var first
First element.
var last
Last element.
var entries
All elements.
BufferedChannel
Extends: Channel<Value>
Properties
var value
Value?
Camera
Camera for triggering map movement and tracking settings.
Extends: BaseCamera
Methods
public func move(
moveController: CameraMoveController
) -> Future<CameraAnimatedMoveResult>
Parameters
public func move(
position: CameraPosition,
time: TimeInterval = 0.3,
animationType: CameraAnimationType = CameraAnimationType.`default`
) -> Future<CameraAnimatedMoveResult>
Parameters
position
Camera end position.
time
TimeInterval
Time allocated for moving the map.
animationType
Type of animation when moving the camera.
Returns
Future<>
public func move(
point: GeoPoint,
zoom: Zoom,
tilt: Tilt?,
bearing: Bearing,
time: TimeInterval = 0.3,
animationType: CameraAnimationType = CameraAnimationType.`default`
) -> Future<CameraAnimatedMoveResult>
Starts an animated map move using the built-in map move controller.<br/>Resets the current map tracking mode and interrupts gesture processing.
Parameters
point
Point of the final camera position.
zoom
Scaling level in the final camera position.
tilt
Tilt in the final camera position or an empty value if you need to use a value from the FollowController or the current value depending on the active tracking mode.
bearing
Bearing in the final camera position.
time
TimeInterval
Time allocated for moving the map.
animationType
Type of animation when moving the camera.
Returns
Future<>
public func processMovementAndStop()
Sets the camera position according to the current time and stopping the animated movement.<br/>The call interrupts the camera flyover and gesture processing and resets the tracking mode.
public func setBehaviour(
behaviour: CameraBehaviour
)
Switch of the camera tracking mode. If a new mode is more restricted then the current one, the call will interrupt the flyover and gesture handling.
Parameters
behaviour
public func addFollowController(
followController: FollowController
)
Adds the follow controller.
Parameters
followController
public func removeFollowController(
followController: FollowController
)
Removes the follow controller.
Parameters
followController
public func setCustomFollowController(
followController: CustomFollowController
)
Adding the follow controller implemented on the platform.
Parameters
followController
public func removeCustomFollowController()
Removes the follow controller implemented on the platform.
Properties
var stateChannel
StatefulChannel<CameraState>
Obtaining the current status of the camera.
var state
Obtaining the current status of the camera.
var behaviourChannel
StatefulChannel<CameraBehaviourChange>
Camera tracking mode.
var behaviour
Camera tracking mode.
CameraNotifier
Warns you if you enter the coverage area of a traffic camera.
Extends: Hashable
public static func == (lhs: CameraNotifier, rhs: CameraNotifier) -> Bool
Returns a Boolean value indicating whether two values are equal.<br/>This documentation comment was inherited from .
public convenience init(
model: Model
)
Navigation extension that warns you if you enter the coverage area of a traffic camera.
Parameters
model
Model of the navigator whose status is being tracked.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
Properties
var cameraProgressChannel
StatefulChannel<CameraProgressInfo?>
Progress of passing the traffic camera coverage area.
var cameraProgress
Progress of passing the traffic camera coverage area.
CameraRouteAttribute
Container that describes a point attribute of a route. Each item is stored as a point on the route, in which the item is located, and the value of the item itself.
Extends: Hashable
public static func == (lhs: CameraRouteAttribute, rhs: CameraRouteAttribute) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [CameraRouteEntry]
Elements that fall within the [begin, end) range.
Parameters
public func findNearBackward(
point: RoutePoint
) -> CameraRouteEntry?
Finds the nearest element with position < = point.<br/>The operation complexity is log2(N), where N = size.
Parameters
public func findNearForward(
point: RoutePoint
) -> CameraRouteEntry?
Finds the nearest element with position < = point.<br/>The operation complexity is log2(N), where N = size.
Parameters
Properties
var size
Number of elements.
var isEmpty
Elements missing.
var first
First element.
var last
Last element.
var entries
All elements.
CancelEvent
Cancellable
Cancellation token for a running operation.
Implements: ICancellable
public init(
cancel: @escaping () -> Void,
release: @escaping () -> Void = {}
)
public convenience init()
Make a cancellation token that cancels nothing.
public static func ==(lhs: Cancellable, rhs: Cancellable) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func cancel()
May be called any number of times from any queue.
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
Channel
public static func ==(lhs: Channel<Value>, rhs: Channel<Value>) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func sink(
receiveValue: @escaping (Value) -> Void
) -> Cancellable
Subscribe to a stream of values over time. The subscription never fails.
Returns
CancellableCancellable instance. Deallocation of the result will tear down the subscription stream.
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
func sinkOnMainThread(_ receiveValue: @escaping (Value) -> Void) -> Cancellable
Get the `Channel` result in the `main` thread.
Returns
func sink(on queue: DispatchQueue, receiveValue: @escaping (Value) -> Void) -> Cancellable
Subscribe to a stream of values over time. The subscription never fails.
Parameters
CheckableGroupedItem
Single element from GroupCheckableItem.
Extends: Hashable
public static func == (lhs: CheckableGroupedItem, rhs: CheckableGroupedItem) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by feeding them into the given hasher.
Parameters
hasher
Hasher
The hasher to use when combining the components of this instance.
CheckableItem
Basic representation of a checkable element from CheckableItemsGroup.
Extends: Hashable
public static func == (lhs: CheckableItem, rhs: CheckableItem) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by feeding them into the given hasher.
Parameters
hasher
Hasher
The hasher to use when combining the components of this instance.
Properties
var type
Gets the type of the checkable element.
var filterType
Gets a list of filters describing the current state of the widget. Can be used during creation of a search query.
CheckableItemsGroup
Widget for presenting a group of selectable elements.
Extends: Widget
Properties
var items
Gets the group of widget elements.
Checkbox
Checkbox widget.
Extends: Widget
Properties
var filterType
Gets the filter type presented by the widget.
var checkedText
Gets the caption of the selected checkbox.
var uncheckedText
Gets the caption of the unselected checkbox.
var values
Gets the list of values used for filtering. Commonly, only one value is used.
var isChecked
Gets the widget state.
Circle
Circle.
Extends: SimpleMapObject
Methods
public func setPosition(
position: GeoPoint
) throws
Sets the location of the circle center.
Parameters
position
Properties
var position
Location of the center of a circle.
var radius
Radius of a circle.
var color
Circle fill color.
var strokeWidth
Circle border line width.
var strokeColor
Circle border color.
var dashedStrokeOptions
ClusterObject
Cluster of objects.
Extends: MapObject
Properties
var position
Gets the cluster position on the map.
var objectCount
Gets the number of markers in the cluster.
var objects
Gets the list of markers in the cluster.
var geometryObject
Obtains the geometric object of the cluster.
CompassControl
CompassControlModel
Model of the compass control. The control consists of a compass button that, when clicked, causes the map camera to change its angle in the direction of north. If the map camera is facing the north, the control must be hidden. Thread-safe.
Extends: Hashable
public static func == (lhs: CompassControlModel, rhs: CompassControlModel) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func onClicked()
Properties
CompassViewModel
ViewModel for the compass UI control.
Extends: ObservableObject
Methods
public func onClicked()
ComplexGeometry
Complex geometry, contains a set of simple or complex geometries.
Extends: Geometry
Properties
var elements
Container
Central object for accessing iOS Mobile SDK features.
public required init(
keySource: KeySource = .default,
logOptions: LogOptions = .default,
httpClientForRequest: IHTTPClient? = nil,
httpOptions: HttpOptions = HttpOptions(),
locationProvider: ILocationProvider? = nil,
magneticHeadingProvider: IMagneticHeadingProvider? = nil,
personalDataCollectionOptions: PersonalDataCollectionOptions = .default,
vendorConfig: VendorConfig = .none
)
Container builder.
Parameters
keySource
Settings of the key to access 2GIS services.
logOptions
Logging settings.
httpClientForRequest
Network client for sending HTTP requests.
httpOptions
HTTP client settings (such as caching).
locationProvider
Geolocation source. If nil is passed, the default source is used.
magneticHeadingProvider
Source of a magnetic needle heading.
personalDataCollectionOptions
Data collection service settings.
vendorConfig
Overwrites settings for working in an autonomous environment.
Methods
public func makeDirectoryViewsFactory() -> IDirectoryViewsFactory
Create a factory of directory SwiftUI elements.
Returns
public func makeMapFactory(
options: MapOptions
) throws -> IMapFactory
Parameters
options
Initial map properties. Specify `.default` to quickly create an online map looking at Moscow, with a fixed inaccurate PPI (not matching the current device).
Returns
public func makeRouteEditorFactory() throws -> IRouteEditorFactory
Creates a factory of route editors.
Returns
public func makeRoadEventCardViewFactory(options: RoadEventCardViewOptions = .default) throws -> IRoadEventCardViewFactory
Creates a factory of a road event card.
Parameters
Properties
var context
Root opaque SDK object container. Used as an argument to the SDK API.
var markerViewFactory
UIView marker factory for map.
var styleFactory
Constructor of standard and custom styles.
var searchManagerFactory
Factory of directory search engines.
var sourceFactory
Factory of map data sources.
var imageFactory
Factory of map object images.
var modelFactory
Model factory for map objects.
var localeManager
Manager of application locale settings.
var locationService
Current ILocationService implementation used within the SDK and working via ILocationProvider.
let httpOptions
HTTP client settings.
var audioSettings
Object for configuring sounds.
var voiceManager
Object for interacting with the list of voice packages of the navigator.
Context
Context - the environment required for the SDK to work.
Extends: Hashable
public static func == (lhs: Context, rhs: Context) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
CoordinatesFollowController
Controller of following the map position coordinates.
Extends: FollowController
public convenience init(
animationDuration: TimeInterval = 1,
valueThreshold: Meter = Meter(value: 0.10000000149011612)
)
Creates a controller following the camera position coordinates.
Parameters
animationDuration
TimeInterval
Duration of changing the actual position.
valueThreshold
Non-negative threshold of the actual position change taken into account.
CreateRoadEventControl
Block for creating road events.
Extends: UIControl
Methods
public override func layoutSubviews()
Properties
var intrinsicContentSize
CurrentLocationControl
Unit with the function of flyover to the current location.
Extends: UIControl
Methods
public override func layoutSubviews()
Properties
var intrinsicContentSize
CurrentLocationViewModel
ViewModel for the UI control of the current location.
Extends: ObservableObject
Methods
public func onClicked()
DgisMapObject
2GIS map object.<br/>Information about an object can be obtained in the directory.
Extends: MapObject
Properties
var id
Stable numeric object ID.
DgisSource
Main interface of 2GIS data sources.
Extends: Source
Methods
public static func createDgisSource(
context: Context,
workingMode: DgisSourceWorkingMode = DgisSourceWorkingMode.hybridOnlineFirst
) -> Source
Creates a source that obtains data from 2GIS servers or uses preloaded data.
Parameters
public func setHighlighted(
directoryObjectIds: [DgisObjectId],
highlighted: Bool
)
Sets or removes object highlighting.<br/>The method adds the “selected” attribute to the object, which can be used in styles.
Parameters
directoryObjectIds
IDs of the objects being changed.
highlighted
Sets or removes a selection.
Properties
var highlightedObjectsChannel
StatefulChannel<[DgisObjectId]>
Obtaining a list of IDs of the highlighted objects.
var highlightedObjects
Obtaining a list of IDs of the highlighted objects.
DirectMapControlBeginEvent
Event to start direct control of the map. Tells the map to process direct map control events. Direct control events only work from DirectMapControlBeginEvent to DirectMapControlEndEvent. After the sequence of direct control events is complete, kinematics can start. Kinematics uses the occurrence time of the event, so it is better to use the time received from the system rather than fill in the value during processing. For now, kinematics only work for moving the map, but not for rotating and zooming.
Extends: Event
public convenience init()
DirectMapControlEndEvent
Event of ending direct map control. Ends direct map control that was started after receiving the DirectMapControlBeginEvent event. Direct map control events are described in DirectMapControlBeginEvent.
Extends: InputEvent
public convenience init(
timestamp: TimeInterval
)
Parameters
timestamp
TimeInterval
DirectMapRotationEvent
Direct map rotation event. The events of direct map control are described in DirectMapControlBeginEvent.
Extends: InputEvent
public convenience init(
bearingDelta: Bearing,
timestamp: TimeInterval,
rotationCenter: ScreenPoint? = nil
)
Parameters
bearingDelta
Change of the map rotation angle, in degrees. Positive values correspond to the direction of rotation counterclockwise.
timestamp
TimeInterval
Time of the system event generation.
rotationCenter
Point on the screen relative to which the map rotates. If not set, rotation is done relative to the map position point.
Properties
var bearingDelta
Changes the rotation angle of the map.
var rotationCenter
Point on the screen relative to which the map rotates.
DirectMapScalingEvent
Event of direct map scaling. Direct map control events are described in DirectMapControlBeginEvent.
Extends: InputEvent
public convenience init(
zoomDelta: Float,
timestamp: TimeInterval,
scalingCenter: ScreenPoint? = nil
)
Parameters
zoomDelta
Float
Value by which the current scale value will change.
timestamp
TimeInterval
Time of the system event generation.
scalingCenter
Point on the screen relative to which the map scales. If not set, scaling is done relative to the map position point.
Properties
var zoomDelta
Float
Value by which the current scale value will change.
var scalingCenter
Point on the screen relative to which the map scales.
DirectMapShiftEvent
Direct map shift event. Direct map control events are described in DirectMapControlBeginEvent.
Extends: InputEvent
public convenience init(
screenShift: ScreenShift,
shiftedPoint: ScreenPoint,
timestamp: TimeInterval
)
Parameters
screenShift
Change in the screen position of the map relative to the previous one, in pixels.
shiftedPoint
Center point from which the map is shifted.
timestamp
TimeInterval
Time of the system event generation.
Properties
var screenShift
Changing the map screen position.
var shiftedPoint
Center point from which the map is shifted.
DirectMapTiltEvent
Event of direct camera tilt. The events of direct map control are described in DirectMapControlBeginEvent.
Extends: InputEvent
public convenience init(
delta: Float,
timestamp: TimeInterval
)
Parameters
delta
Float
Tilt angle change in degrees.
timestamp
TimeInterval
Time of the system event generation.
Properties
var delta
Float
Tilt angle change in degrees.
DirectoryObject
Directory object.
Extends: Hashable
public static func == (lhs: DirectoryObject, rhs: DirectoryObject) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func formattedAddress(
type: FormattingType
) -> FormattedAddress?
String representation of the address formatted according to the specified length requirement.
Parameters
public func publicTransportScheduleInfo(
departureTimeUtc: UInt64
) -> Future<PublicTransportDirectoryScheduleInfo?>
Returns information about the transport schedule on stop platforms and route directions.
Parameters
departureTimeUtc
Unix time in UTC to get the schedule.
Returns
PublicTransportDirectoryScheduleInfo<?>
Properties
var types
Object type. There can be several, for example, Sun City Mall is a branch of an organization and a building at the same time. The first type in this list is the primary type.
var title
Object title.
var titleAddition
Additional title information. Example: “(apt. 1-12)”. To get this information, please request additional key setup.
var subtitle
Object subtitle.<br/>Can be an empty string if a subtitle is missing.
var description
Object description.
var id
Stable numeric object ID.
var markerPosition
Point of the object where the marker should be placed.
var address
Address of the object as a set of components.
var attributes
Additional object attributes.
var contextAttributes
Contextual object's additional attributes.
var timeZoneOffset
The shift of the object's local time relative to UTC in seconds at the current moment.
var openingHours
Opening hours of the object.
var contactInfos
Contacts of the object.
var reviews
Reviews.
var parkingInfo
Additional parking information.
var workStatus
Operating status.
var levelId
Identifier of the floor on which the facility is located. To get this information, please request additional key setup.
var buildingLevels
Information about the floor plans of the building.
var entrances
Information about entrances. To get this information, please request additional key setup.
var tradeLicense
Data on the organization license. To get this information, please request additional key setup.
var buildingInfo
Information about building.
var chargingStation
EV charging station attributes.
var rubricIds
Rubric identifiers.
var orgInfo
Information about the organization.
var group
Objects grouped into a combined card. To get this information, please request additional key setup.
var routeInfos
Information about public transport routes. The field is filled only when searching by object ID.
DoubleRouteAttribute
Container that describes a point attribute of a route. Each item is stored as a point on the route, in which the item is located, and the value of the item itself.
Extends: Hashable
public static func == (lhs: DoubleRouteAttribute, rhs: DoubleRouteAttribute) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [DoubleRouteEntry]
Elements that fall within the [begin, end) range.
Parameters
public func findNearBackward(
point: RoutePoint
) -> DoubleRouteEntry?
Finds the nearest element with position < = point.<br/>The operation complexity is log2(N), where N = size.
Parameters
public func findNearForward(
point: RoutePoint
) -> DoubleRouteEntry?
Finds the nearest element with position < = point.<br/>The operation complexity is log2(N), where N = size.
Parameters
Properties
var size
Number of elements.
var isEmpty
Elements missing.
var first
First element.
var last
Last element.
var entries
All elements.
DynamicRouteInfoSettings
Settings for getting dynamic route data.
Extends: Hashable
public static func == (lhs: DynamicRouteInfoSettings, rhs: DynamicRouteInfoSettings) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
Properties
var updatePeriod
Frequency at which dynamic route data should be updated.
Event
Base class for all events handled.
Extends: Hashable
public static func == (lhs: Event, rhs: Event) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
ExceedSpeedLimitSettings
Settings of the detection of exceeding the speed limit.
Extends: Hashable
public static func == (lhs: ExceedSpeedLimitSettings, rhs: ExceedSpeedLimitSettings) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
Properties
var exceedSpeedNotificationEnabled
Enables/disables detection of exceeding the maximum permitted speed limit.
var allowableSpeedExcess
Float
Allowed exceeding of the speed limit in m/s, default is 0.
File
File ID.
Extends: Hashable
public static func == (lhs: File, rhs: File) -> Bool
Returns a Boolean value indicating whether two values are equal.<br/>This documentation comment was inherited from .
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
FloatRouteLongAttribute
Container that stores an extended route attribute. Each element is stored as a pair consisting of a point and an attribute element value. The action of the attribute starts at the given point and ends at the next point, starting from which the action of the attribute of the next element begins.
Extends: Hashable
public static func == (lhs: FloatRouteLongAttribute, rhs: FloatRouteLongAttribute) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func entry(
point: RoutePoint
) -> FloatRouteLongEntry?
Element in which the point falls.
Parameters
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [FloatRouteLongEntry]
Elements partially or completely covered by the [begin, end] segment.
Parameters
Properties
var size
Number of elements.
var isEmpty
Elements missing.
var first
First element.
var last
Last element.
var entries
All elements.
FollowController
Allows you to control the position of the camera and the geopositioning marker. All its methods implementations must be thread-safe. Most methods have trivial default implementations (so that FollowController, which is responsible for scaling, does not have to override coordinates() methods, etc.).
Extends: Hashable
public static func == (lhs: FollowController, rhs: FollowController) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
FreeRoamSelector
Controller for switching the navigator to `FreeRoam` mode if the route rebuilds too long.
Extends: Hashable
public static func == (lhs: FreeRoamSelector, rhs: FreeRoamSelector) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them into the specified hasher.
Parameters
hasher
Hasher
The hasher to use when combining the components of the instance.
Properties
var enabled
FreeRoamSettings
Extends: Hashable
public static func == (lhs: FreeRoamSettings, rhs: FreeRoamSettings) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
Properties
var onRoutePrefetchLength
Road graph tiles are loaded into HTTP cache during route guidance if they correspond to the route section from the current position to the specified distance. The default value is 5 km.<br/>Tiles are not loaded into the HTTP cache if the parameter corresponds to a zero or negative distance.
var onRoutePrefetchRadiusMeters
When caching road graph tiles during route guidance, the tiles are loaded into HTTP cache if they are closer than the specified distance in meters from the route line. The default value is 1 km.<br/>Tiles are not loaded into HTTP cache if the parameter corresponds to zero or negative distance.
var prefetchRadiusMeters
Road graph tiles are loaded into HTTP cache if they are closer than the specified distance in meters from the current position. The default value is 2 km.<br/>Tiles are not loaded to HTTP cache if the parameter corresponds to zero or negative distance.
Future
public init(
subscriber: @escaping Subscriber,
canceller: @escaping Canceller = {}
)
Parameters
subscriber
Subscriber
Creates a new subscription.
canceller
Canceller
Releases all associated resources. It must be called at some point after the subscription has fired (e.g. in `deinit`).
public static func ==(lhs: Future<Value>, rhs: Future<Value>) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func sink(
receiveValue: @escaping (Value) -> Void,
failure: @escaping (Error) -> Void
) -> Cancellable
Subscribes for a future value or an error.
Returns
CancellableCancellable instance. Deallocation of the result will tear down the single value subscription.
public func sink(
receiveCompletion: @escaping () -> Void,
failure: @escaping (Error) -> Void
) -> Cancellable where Value == Void
Subscribes for a future value or an error.
Returns
CancellableCancellable instance. Deallocation of the result will tear down the single value subscription.
static func makeReadyValue(_ value: Value) -> Future<Value>
Makes an immediately ready future value.
Returns
Future<>
static func makeReadyError(message: String) -> Future<Value>
Makes an immediately ready future error.
Parameters
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
func sinkOnMainThread(
receiveValue: @escaping (Value) -> Void,
failure: @escaping (Error) -> Void
) -> DGis.Cancellable
Returns
CancellableDGis.
Geometry
Geometry object.
Extends: Hashable
public static func == (lhs: Geometry, rhs: Geometry) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
Properties
var kind
var bounds
Rectangle of minimum size containing geometry.
var minPoint
Minimal point of the bounding rectangle.
var maxPoint
Maximum point of the bounding rectangle.
GeometryMapObject
Geometric object of the map.
Extends: MapObject
Properties
var geometryChannel
StatefulChannel<Geometry>
Object geometry.
var geometry
Object geometry.
var objectAttributes
Getting map object properties to read and change.
var isVisibleChannel
StatefulChannel<Bool>
The current visibility flag of the object.
var isVisible
The current visibility flag of the object.
var isDraggableChannel
StatefulChannel<Bool>
Current object relocatability flag.
var isDraggable
Current object relocatability flag.
var animationSettings
Getting animation settings.
Applied to objects of the `3D model` or `Directional model` type.
var bounds
Rectangle of minimum size containing geometry.
GeometryMapObjectBuilder
Sets properties and subsequently creating geometric objects.
Extends: Hashable
public static func == (lhs: GeometryMapObjectBuilder, rhs: GeometryMapObjectBuilder) -> Bool
Returns a Boolean value indicating whether two values are equal.
public convenience init()
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func setObjectAttribute(
name: String,
value: AttributeValue
) -> GeometryMapObjectBuilder
Sets a map object attribute.
Parameters
name
Name of the map object property.
value
Value of the map object property.
Returns
public func setObjectAttributes(
values: [String: AttributeValue]
) -> GeometryMapObjectBuilder
Sets map object properties.<br/>The method does not replace the entire set of object properties, i.e. if a property is missing in the values, but has already been added to the object earlier, it is not changed.
Parameters
values
String[ : ]
Set of “name”:“value” pairs for the added map object properties.
Returns
public func setGeometry(
geometry: Geometry
) -> GeometryMapObjectBuilder
Sets the geometry of a map object.
Parameters
public func setVisible(
visible: Bool
) -> GeometryMapObjectBuilder
Sets the visibility of a map object.
Parameters
public func setDraggable(
draggable: Bool
) -> GeometryMapObjectBuilder
Sets the ability to drag a map object.
Parameters
public func setUserData(
userData: Any
) -> GeometryMapObjectBuilder
Installs user data.<br/>User data is not used in any way in the SDK and is only returned to the user.
Returns
GeometryMapObjectSource
Spurce of geometric map objects.
Extends: Source
Methods
public func clusteringObjects(
position: CameraPosition
) -> [MapObject]
Gets the list of objects participating in clustering at the passed camera position. The list will contain both clusters and geometric objects.
Parameters
public func addObject(
item: GeometryMapObject
)
Adds an object to the source.
Parameters
public func addObjects(
objects: [GeometryMapObject]
)
Adds multiple objects to the source.
Parameters
objects
public func removeObject(
item: GeometryMapObject
)
Deletes an object from the source.<br/>The deletion is asynchronous, thread-safe, the method can be used from any thread.
Parameters
public func removeObjects(
objects: [GeometryMapObject]
)
Removes multiple objects from the source.
Parameters
objects
public func removeAndAddObjects(
objectsToRemove: [GeometryMapObject],
objectsToAdd: [GeometryMapObject]
)
Removes and adds objects to the source.
Parameters
public func clear()
Removes all objects from the source.
Properties
var objects
Gets all objects added to the source.
var sourceAttributes
Gets default property values for all objects added to the source (see IAttributes).
GeometryMapObjectSourceBuilder
Extends: Hashable
public static func == (lhs: GeometryMapObjectSourceBuilder, rhs: GeometryMapObjectSourceBuilder) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func setSourceAttribute(
name: String,
value: AttributeValue
) -> GeometryMapObjectSourceBuilder
Sets a map object property common to the entire source (see ISource).
Parameters
public func setSourceAttributes(
values: [String: AttributeValue]
) -> GeometryMapObjectSourceBuilder
Sets map object properties common to the entire source.
Parameters
public func addObject(
item: GeometryMapObject
) -> GeometryMapObjectSourceBuilder
Adds a geometric map object to the source.
Parameters
public func addObjects(
objects: [GeometryMapObject]
) -> GeometryMapObjectSourceBuilder
Adds multiple geometric map objects to the source.
Parameters
public func createSource() -> GeometryMapObjectSource
Creates a geometry object source.<br/>After calling this function, you cannot use GeometryMapObjectSourceBuilder to create a data source or to set data source parameters.
Returns
GeoPointRouteAttribute
Container that describes a point attribute of a route. Each item is stored as a point on the route, in which the item is located, and the value of the item itself.
Extends: Hashable
public static func == (lhs: GeoPointRouteAttribute, rhs: GeoPointRouteAttribute) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [GeoPointRouteEntry]
Elements that fall within the [begin, end) range.
Parameters
public func findNearBackward(
point: RoutePoint
) -> GeoPointRouteEntry?
Finds the nearest element with position < = point.<br/>The operation complexity is log2(N), where N = size.
Parameters
public func findNearForward(
point: RoutePoint
) -> GeoPointRouteEntry?
Finds the nearest element with position < = point.<br/>The operation complexity is log2(N), where N = size.
Parameters
public func calculateGeoPoint(
routePoint: RoutePoint
) -> SegmentGeoPoint?
Calculates a GeoPoint from a known RoutePoint.<br/>Operation complexity is O(log2(N)), where N = route_geometry.size()
Parameters
routePoint
Returns
SegmentGeoPoint?Calculated geographic coordinates and direction of the segment pointed to by the route_point parameter. If the route is empty or route_point is out of range, nil is returned.
public func calculateClosestPoint(
point: GeoPoint
) -> RoutePoint?
Calculates the nearest point on the route to the given geographic coordinates of a point.<br/>Operation complexity is O(N), where N = route_geometry.size()
Parameters
point
Point projected on the route.
Returns
RoutePoint?Nearest point on the route. If the route is empty of both range.first and range.second points are located before of after the route, nil is returned.
Properties
var size
Number of elements.
var isEmpty
Elements missing.
var first
First element.
var last
Last element.
var entries
All elements.
var length
Route length.
GroupCheckableItem
Set of selectable elements working as a radio group.
Extends: CheckableItem
Properties
var items
Gets a set of group elements.
HttpCacheManager
HTTP cache management interface.
Extends: Hashable
public static func == (lhs: HttpCacheManager, rhs: HttpCacheManager) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func clear()
Clears contents of HTTP cache.
Image
Image.
Extends: Hashable
public static func == (lhs: Image, rhs: Image) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
IncompleteTextHandler
Auto-complete for user-entered text is suggested.
Extends: Hashable
public static func == (lhs: IncompleteTextHandler, rhs: IncompleteTextHandler) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
Properties
var queryText
It is needed to substitute this text in the search string and let the user continue typing the query.
IndoorBuilding
Building with floor plans.
Extends: Hashable
public static func == (lhs: IndoorBuilding, rhs: IndoorBuilding) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
Properties
var id
Identifier of a building with floor plans.
var defaultLevelIndex
Default floor index.
var levels
Information about all floors.
var activeLevelIndexChannel
StatefulChannel<UInt64>
Serial infex of the active floor in levels.
var activeLevelIndex
Serial infex of the active floor in levels.
IndoorControl
UI control of the floors in the building.
Extends: UIControl
Methods
public override func layoutSubviews()
Properties
var focusedBuildingChangeCallback
(() -> ())?
Callback closure when changing the current building.
var intrinsicContentSize
IndoorControlModel
Model of the floors control.
Extends: Hashable
public static func == (lhs: IndoorControlModel, rhs: IndoorControlModel) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
Properties
var activeLevelIndexChannel
StatefulChannel<UInt64?>
Active floor index.
var activeLevelIndex
Active floor index.
var markedLevels
Set<LevelId>
Floors on which labels are displayed.
var levelNamesChannel
StatefulChannel<[String]>
Floor names. Blank if the map does not show a building with floor plans, or if the building has only one floor.
var levelNames
Floor names. Blank if the map does not show a building with floor plans, or if the building has only one floor.
IndoorDetector
Detector that determines if the user is indoors.
Extends: Hashable
public static func == (lhs: IndoorDetector, rhs: IndoorDetector) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
Properties
var indoorChannel
StatefulChannel<Bool>
Channel that alerts you when the user is indoors.
var indoor
Channel that alerts you when the user is indoors.
IndoorManager
Gets the current building with floor plans.
Extends: Hashable
public static func == (lhs: IndoorManager, rhs: IndoorManager) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func setIndoorState(
newState: IndoorManagerState
)
Switches the state (enabled/disabled) of the floor plan manager.
Parameters
newState
Properties
var focusedBuildingChannel
StatefulChannel<IndoorBuilding?>
Gets the current building with floor plans.
var focusedBuilding
Gets the current building with floor plans.
IndoorRouteLevelsGetter
Allows you to get a set of floors through which the routes displayed on the map pass.
Extends: Hashable
public static func == (lhs: IndoorRouteLevelsGetter, rhs: IndoorRouteLevelsGetter) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
Properties
var levelIdsChannel
StatefulChannel<Set<LevelId>>
var levelIds
Set<LevelId>
IndoorViewModel
ViewModel for the UI control of the traffic jam visibility.
Extends: ObservableObject
InputEvent
User input event.
Extends: Event
Properties
var timestamp
Obtains the registration time of the input event.
InstructionRouteAttribute
Container that describes a point attribute of a route. Each item is stored as a point on the route, in which the item is located, and the value of the item itself.
Extends: Hashable
public static func == (lhs: InstructionRouteAttribute, rhs: InstructionRouteAttribute) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [InstructionRouteEntry]
Elements that fall within the [begin, end) range.
Parameters
public func findNearBackward(
point: RoutePoint
) -> InstructionRouteEntry?
Finds the nearest element with position < = point.<br/>The operation complexity is log2(N), where N = size.
Parameters
public func findNearForward(
point: RoutePoint
) -> InstructionRouteEntry?
Finds the nearest element with position < = point.<br/>The operation complexity is log2(N), where N = size.
Parameters
Properties
var size
Number of elements.
var isEmpty
Elements missing.
var first
First element.
var last
Last element.
var entries
All elements.
IntRouteAttribute
Container that describes a point attribute of a route. Each item is stored as a point on the route, in which the item is located, and the value of the item itself.
Extends: Hashable
public static func == (lhs: IntRouteAttribute, rhs: IntRouteAttribute) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [IntRouteEntry]
Elements that fall within the [begin, end) range.
Parameters
public func findNearBackward(
point: RoutePoint
) -> IntRouteEntry?
Find the nearest element with position < = point.<br/>The operation complexity is log2(N), where N = size.
Parameters
public func findNearForward(
point: RoutePoint
) -> IntRouteEntry?
Find the nearest element with position < = point.<br/>The operation complexity is log2(N), where N = size.
Parameters
Properties
var size
Number of elements.
var isEmpty
Elements missing.
var first
First element.
var last
Last element.
var entries
All elements.
ItemMarkerInfo
Object identifier and coordinates.
Extends: Hashable
public static func == (lhs: ItemMarkerInfo, rhs: ItemMarkerInfo) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
Properties
var objectId
var geoPoint
var floorInfo
var title
var rubricIds
var tradeLicense
Organization trade license. To get this information, please request additional key setup.
LaneSignRouteLongAttribute
Container that stores an extended route attribute. Each element is stored as a pair consisting of a point and an attribute element value. The action of the attribute starts at the given point and ends at the next point, starting from which the action of the attribute of the next element begins.
Extends: Hashable
public static func == (lhs: LaneSignRouteLongAttribute, rhs: LaneSignRouteLongAttribute) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func entry(
point: RoutePoint
) -> LaneSignRouteLongEntry?
Element in which the point falls.
Parameters
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [LaneSignRouteLongEntry]
Elements partially or completely covered by the [begin, end] segment.
Parameters
Properties
var size
Number of elements.
var isEmpty
Elements missing.
var first
First element.
var last
Last element.
var entries
All elements.
LocaleManager
Manager of locale settings of an application.
Extends: Hashable
public static func == (lhs: LocaleManager, rhs: LocaleManager) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func overrideLocales(
locales: [Locale]
)
Sets a list of application locales.
Parameters
locales
Properties
var localesChannel
StatefulChannel<[Locale]>
Application locales. If not set, locales set by operating system user are used.
var locales
Application locales. If not set, locales set by operating system user are used.
var systemLocalesChannel
StatefulChannel<[Locale]>
Gets locales provided by the operating system.
var systemLocales
Gets locales provided by the operating system.
LocationService
Class for working with a geolocation source installed during SDK initialization.
Extends: Hashable
public static func == (lhs: LocationService, rhs: LocationService) -> Bool
Returns a Boolean value indicating whether two values are equal.<br/>This documentation comment was inherited from .
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by feeding them into the given hasher.<br/>This documentation comment was inherited from .
Parameters
hasher
Hasher
The hasher to use when combining the components of this instance.
Properties
var lastLocationChannel
StatefulChannel<Location?>
Channel that notifies about geolocation change.
var lastLocation
Channel that notifies about geolocation change.
Map
Map.
Extends: Hashable
public static func == (lhs: Map, rhs: Map) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func setFontIconSizeMultiplier(
multiplier: Float
) throws
Sets the size multiplier for icons and fonts obtained from the application.<br/>Through set_font_icon_size_multiplier, you can set the size multiplier for icons and fonts without having to change the system multiplier and thus without affecting the size of icons and fonts in other applications.
Parameters
multiplier
Float
public func resetFontIconSizeMultiplier()
Resets the size multiplier for icons.
public func addSource(
source: Source
)
Adds a data source to the map.<br/>Happens asynchronously. The method can be called from any thread, thread-safe.
Parameters
source
public func removeSource(
source: Source
)
Removes a data source from the map.<br/>Happens asynchronously. The method can be called from any thread, thread-safe.
Parameters
source
public func getRenderedObjects(
centerPoint: ScreenPoint,
radius: ScreenDistance = ScreenDistance(value: 1)
) -> Future<[RenderedObjectInfo]>
Gets the displayed map objects projected on a circle on the screen.<br/>The list of objects is formed in the rendering order from late to early.
Parameters
public func sublayerAttributes(
sublayerName: String
) -> Attributes
Gets sublayer attributes that were previously passed explicitly.
Parameters
Properties
var id
Identifier of the map instance, unique within the process.
var camera
Gets a camera.
var indoorManager
Gets floor plan manager.
var dataLoadingStateChannel
StatefulChannel<MapDataLoadingState>
Notification of the status of data being loaded into the map.<br/>When tracking a camera position, the map state is always MapDataLoadingState::Loading.
var dataLoadingState
Notification of the status of data being loaded into the map.<br/>When tracking a camera position, the map state is always MapDataLoadingState::Loading.
var styleChannel
StatefulChannel<Style>
Gets the current map styles.
var style
Gets the current map styles.
var fontIconSizeMultiplierChannel
StatefulChannel<Float>
Icon and font size multiplier obtained from the application.
var fontIconSizeMultiplier
Float
Icon and font size multiplier obtained from the application.
var sources
Obtains map data sources.<br/>Happens asynchronously. The method can be called from any thread, thread-safe.
var mapVisibilityStateChannel
StatefulChannel<MapVisibilityState>
var mapVisibilityState
var attributes
Gets attributes.<br/>The following properties must be specified: “theme”=“day|night” “navigatorOn”=“true|false”
var interactiveChannel
StatefulChannel<Bool>
Interactivity of the map (a user can interact with the map). If interactivity is disabled, the map stops responding to input events obtained from the user. Also, the map controls (zooming in and moving to the current position) stop working. However, you can still work with the map via set_position/move. When switching to a non-interactive state, incomplete gestures are reset. By default, the map is interactive (interactive == true).<br/>The function can be called from any thread.
var interactive
Interactivity of the map (a user can interact with the map). If interactivity is disabled, the map stops responding to input events obtained from the user. Also, the map controls (zooming in and moving to the current position) stop working. However, you can still work with the map via set_position/move. When switching to a non-interactive state, incomplete gestures are reset. By default, the map is interactive (interactive == true).<br/>The function can be called from any thread.
var graphicsPresetHintChannel
StatefulChannel<GraphicsPreset?>
Gets the recommended graphic mode for the given device.
var graphicsPresetHint
Gets the recommended graphic mode for the given device.
var graphicsPresetChannel
StatefulChannel<GraphicsPreset?>
Gets the graphic mode.
In case of nil, the recommended mode is used.
If the recommended mode cannot be defined, the Normal one is used.
var graphicsPreset
Gets the graphic mode.
In case of nil, the recommended mode is used.
If the recommended mode cannot be defined, the Normal one is used.
MapLocationController
Controller for managing map positioning in the navigator.
Extends: Hashable
public static func == (lhs: MapLocationController, rhs: MapLocationController) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by feeding them into the given hasher.
Parameters
hasher
Hasher
The hasher to use when combining the components of this instance.
Properties
var mapToNorthOrientation
If forced map orientation to the north is enabled.
MapManager
Interface that allows you to add maps to and remove them from the navigator.
Extends: Hashable
public static func == (lhs: MapManager, rhs: MapManager) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
MapMarkerViewModel
Extends: ObservableObject
public init(
id: UUID,
position: GeoPointWithElevation,
anchor: Anchor,
offsetX: CGFloat,
offsetY: CGFloat
)
Parameters
MapObject
Object on the map.
Extends: Hashable
public static func == (lhs: MapObject, rhs: MapObject) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
Properties
var userData
Any
Random custom data attached to the object.
MapObjectManager
Extends: Hashable
public static func == (lhs: MapObjectManager, rhs: MapObjectManager) -> Bool
Returns a Boolean value indicating whether two values are equal.<br/>This documentation comment was inherited from .
public convenience init(
map: Map,
layerId: String? = nil
)
Create IMapObjectManager.
Parameters
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public static func withClustering(
map: Map,
logicalPixel: LogicalPixel,
maxZoom: Zoom,
clusterRenderer: SimpleClusterRenderer,
minZoom: Zoom = Zoom(value: 0),
layerId: String? = nil
) -> MapObjectManager
Create IMapObjectManager with data clustering. Only IMarker objects are clustered.
Parameters
map
logicalPixel
Minimum possible distance on the screen between marker anchor points on levels where clustering works.
maxZoom
The level from which all markers are visible.
clusterRenderer
Interface for specifying cluster display parameters.
minZoom
The level from which clusters are formed.
layerId
ID of a layer with "Dynamic object" style type. Created objects will be stored in this layer so that you can define their order relative to other layers. If not set, objects are stored above other layers.
Returns
public static func withGeneralization(
map: Map,
logicalPixel: LogicalPixel,
maxZoom: Zoom,
minZoom: Zoom = Zoom(value: 0),
layerId: String? = nil
) -> MapObjectManager
Create IMapObjectManager with data generalization. Only IMarker objects are generalized.
Parameters
map
logicalPixel
The minimum possible distance on the screen between marker anchor points on the levels where generalization works.
maxZoom
The level from which all markers are visible.
minZoom
The level from which the generalization works.
layerId
ID of a layer with "Dynamic object" style type. Created objects will be stored in this layer so that you can define their order relative to other layers. If not set, objects are stored above other layers.
Returns
public func removeObjects(
objects: [SimpleMapObject]
)
Removes objects.
Parameters
objects
public func removeAndAddObjects(
objectsToRemove: [SimpleMapObject],
objectsToAdd: [SimpleMapObject]
)
Removes and adds objects.
Parameters
public func removeAll()
public func clusteringObjects(
position: CameraPosition
) -> [MapObject]
Gets the list of objects participating in clustering at the transmitted camera position. The list will contain both clusters and markers.
Parameters
Properties
var isVisible
Overrides the visibility of all objects added to the manager instance. The value false here takes precedence over the visibility of an individual object.
MapObjectTappedCallback
Stores a callback function that is called when you click on the map.
public init(callback: @escaping (_ objectInfo: RenderedObjectInfo) -> Void)
public static func == (lhs: MapObjectTappedCallback, rhs: MapObjectTappedCallback) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
MapRotationBeginEvent
Event of the beginning of the map rotation around the point.
Extends: Event
public convenience init(
inDirection: MapRotationDirection
)
Parameters
inDirection
Properties
var direction
MapRotationEndEvent
MapScalingBeginEvent
MapScalingEndEvent
MapShiftBeginEvent
MapShiftEndEvent
Marker
Point mark on the map that is of interest to the user.
Extends: SimpleMapObject
Properties
var position
Gets marker location.
var icon
Obtains marker icon.
var anchor
Gets the anchor point of the marker icon.
var iconOpacity
Gets the transparency of the marker icon.
var text
Gets the marker caption.
var textStyle
Gets the marker caption style.
var isDraggable
Gets the marker relocatability flag.
var iconWidth
Gets the target marker width used for scaling.
var iconMapDirection
Angle of rotation of the marker on the map relative to the north direction, clockwise.
var animatedAppearance
Whether to animate the appearance.
var iconAnimationMode
Gets the animation mode for an animated marker.
MillisecondsRouteAttribute
Container that describes a point attribute of a route. Each item is stored as a point on the route, in which the item is located, and the value of the item itself.
Extends: Hashable
public static func == (lhs: MillisecondsRouteAttribute, rhs: MillisecondsRouteAttribute) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [MillisecondsRouteEntry]
Elements that fall within the [begin, end) range.
Parameters
public func findNearBackward(
point: RoutePoint
) -> MillisecondsRouteEntry?
Finds the nearest element with position < = point.<br/>The operation complexity is log2(N), where N = size.
Parameters
public func findNearForward(
point: RoutePoint
) -> MillisecondsRouteEntry?
Finds the nearest element with position < = point.<br/>The operation complexity is log2(N), where N = size.
Parameters
public func calculateDuration(
routePoint: RoutePoint
) -> TimeInterval
Parameters
public func calculateDuration(
fromRoutePoint: RoutePoint,
toRoutePoint: RoutePoint
) -> TimeInterval
Parameters
Properties
var size
Number of elements.
var isEmpty
Elements missing.
var first
First element.
var last
Last element.
var entries
All elements.
var duration
Route duration.
Model
Navigator model intended to be displayed in the UI.
Extends: Hashable
public static func == (lhs: Model, rhs: Model) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func betterRouteResponse(
response: BetterRouteResponse
)
User response on the application of the suggested better route.
Parameters
response
Properties
var stateChannel
StatefulChannel<State>
Navigator state.
var state
Navigator state.
var locationChannel
StatefulChannel<Location?>
Current geoposition that the navigator is working with.
var location
Current geoposition that the navigator is working with.
var locationAvailableChannel
StatefulChannel<Bool>
Flag that indicates whether the current geoposition is used for navigation. After obtaining the geoposition, the navigator decides whether it is suitable for navigation (for example, if the geoposition has too large error, the navigator may decide that it is not suitable for navigation). If the geoposition is suitable for navigation, the navigator sets true in this channel, if not - false.<br/>Even if the value in this channel is false, the geoposition can be updated in the location_channel.
var locationAvailable
Flag that indicates whether the current geoposition is used for navigation. After obtaining the geoposition, the navigator decides whether it is suitable for navigation (for example, if the geoposition has too large error, the navigator may decide that it is not suitable for navigation). If the geoposition is suitable for navigation, the navigator sets true in this channel, if not - false.<br/>Even if the value in this channel is false, the geoposition can be updated in the location_channel.
var routeChannel
StatefulChannel<RouteInfo>
Route with maneuvers.<br/>In the free roam mode (StateChannel::FreeRoam), there is no route that the user is following. That is why the navigator represents the road section on that the user is currently moving as a route and returns it as the current route. This description of the road is not a full-fledged route, because it has no finish line and maneuvers.
var route
Route with maneuvers.<br/>In the free roam mode (StateChannel::FreeRoam), there is no route that the user is following. That is why the navigator represents the road section on that the user is currently moving as a route and returns it as the current route. This description of the road is not a full-fledged route, because it has no finish line and maneuvers.
var dynamicRouteInfoChannel
StatefulChannel<DynamicRouteInfo>
Traffic events and traffic data on the route or on the predicted part of the route for FreeRoam mode.
var dynamicRouteInfo
Traffic events and traffic data on the route or on the predicted part of the route for FreeRoam mode.
var routePositionChannel
StatefulChannel<RoutePoint?>
Current user position on the route.
var routePosition
Current user position on the route.
var exceedingMaxSpeedLimitChannel
StatefulChannel<Bool>
Flag of exceeding the maximum allowed speed.
var exceedingMaxSpeedLimit
Flag of exceeding the maximum allowed speed.
var betterRouteChannel
StatefulChannel<BetterRouteInfo?>
Signal about finding an alternative route with a shorter expected travel time. If the value in the channel is nil, it means that an alternative route is found or is no longer relevant.
var betterRoute
Signal about finding an alternative route with a shorter expected travel time. If the value in the channel is nil, it means that an alternative route is found or is no longer relevant.
var distance
Measurement<UnitLength>?
Distance from the current position to the end of the route.
var duration
Travel time from the current position to the end of the route.
var isFreeRoam
ModelData
Model data.
Extends: Hashable
public static func == (lhs: ModelData, rhs: ModelData) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them into the specified hasher.
Parameters
hasher
Hasher
The hasher to use when combining the components of the instance.
ModelMapObject
Model on the map.
Extends: SimpleMapObject
public convenience init(
options: ModelMapObjectOptions
) throws
Parameters
options
Properties
var position
Model location.
var modelData
Model data.
var opacity
Model opacity.
var size
Model size.
var mapDirection
Angle of the model rotation on the map relative to the north direction in degrees, counted clockwise.
var animationSettings
Animation settings.
MyLocationControlModel
Model of the control of the flyover to the user's location. The control consists of a button that, when pressed, moves the camera to the user's location. If no location is defined, nothing happens. The object methods must be called on the same thread.
Extends: Hashable
public static func == (lhs: MyLocationControlModel, rhs: MyLocationControlModel) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func onClicked()
Properties
var isEnabledChannel
StatefulChannel<Bool>
var isEnabled
var followStateChannel
StatefulChannel<CameraFollowState>
var followState
MyLocationMapObject
Geoposition marker.
Extends: MapObject
Methods
Properties
var animationSettings
Gets animation settings for reading and editing.
var objectAttributes
Gets map object properties for reading and editing.
MyLocationMapObjectSource
Source containing a geoposition marker.
Extends: Source
public convenience init(
context: Context,
controllerSettings: MyLocationControllerSettings = MyLocationControllerSettings(),
markerType: MyLocationMapObjectMarkerType = MyLocationMapObjectMarkerType.model
)
Create a geopositioning marker source.
Parameters
Properties
var item
Get geo-positioning marker.
MyLocationMapObjectSourceProvider
Provider of the geolocation marker source.
Extends: Hashable
public static func == (lhs: MyLocationMapObjectSourceProvider, rhs: MyLocationMapObjectSourceProvider) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by feeding them into the given hasher.
Parameters
hasher
Hasher
The hasher to use when combining the components of this instance.
Properties
var myLocationMapObjectSource
Source that contains the geolocation marker.
NavigationFollowController
Interface for managing map tracking of the geopositioning marker in the navigator.
Extends: Hashable
public static func == (lhs: NavigationFollowController, rhs: NavigationFollowController) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func setFollow(
follow: Bool
)
Immediately enables or disables the map tracking mode for the geopositioning marker.
Parameters
follow
Properties
var followReturnDelay
Timeout after which the map will automatically return to Geoposition Marker Tracking mode after the user has moved it. 0 - automatic return to Geoposition Marker tracking mode is disabled.
var cameraBehaviour
Mode of the camera following the geolocation marker in the navigator.
NavigationFollowingControl
Extends: UIControl
NavigationManager
Root public interface of the navigator.
Extends: Hashable
public static func == (lhs: NavigationManager, rhs: NavigationManager) -> Bool
Returns a Boolean value indicating whether two values are equal.<br/>This documentation comment was inherited from .
public convenience init(
platformContext: Context
) throws
Navigator API entry point, used in the SDK by default.
Parameters
platformContext
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func start() throws
public func start(
routeBuildOptions: RouteBuildOptions,
trafficRoute: TrafficRoute? = nil
) throws
Starts the route guidance.
Parameters
routeBuildOptions
Parameters with which the navigator will rebuild the route.
trafficRoute
Route on which tracking is started. If not set, the navigator builds a route from the current position.
public func startSimulation(
routeBuildOptions: RouteBuildOptions,
trafficRoute: TrafficRoute
) throws
Starts the simulation of route guidance.
Parameters
routeBuildOptions
Parameters with which the navigator will rebuild the route.
trafficRoute
Route guidance that triggers the simulation.
public func stop()
Stops the navigator operation.
Properties
var uiModel
Navigator model intended to be displayed in the UI.
var indoorDetector
Navigates indoors.
var mapFollowController
Controls the automatic return of the map to track the geo-position marker.
var mapLocationController
Controller for managing map positioning in the navigator.
var mapManager
Navigator map manager.
var zoomFollowSettings
Settings of map scaling during the guidance mode.
var routeMapSettings
Route display settings on the map.
var routeSourceSettings
Settings for the source used to display the route on the map.
var routeMapObjectsProvider
Provider of route objects on the map.
var simulationSettings
Route guidance simulation settings.
var voiceSelector
Manages voice packets in the current navigator session.
var exceedSpeedLimitSettings
Settings for speeding detection.
var dynamicRouteInfoSettings
Settings for getting and updating dynamic route data.
var soundNotificationSettings
Settings for sound alerts in the current navigator session.
var freeRoamSettings
Settings for driving without a route in free roam mode.
var alternativeRoutesProviderSettings
Settings of finding alternate routes in the guidance mode.
var alternativeRouteSelector
Alternative route selection.
var myLocationMapObjectSourceProvider
Provider of the geolocation marker source.
var routeRebuilder
Controller for searching for a new route when leaving the current route.
var freeRoamSelector
Controller for switching the navigator to `FreeRoam` mode if the route rebuilds too long.
NavigationVoice
Voice to be used in the navigator.
Extends: Hashable
public static func == (lhs: NavigationVoice, rhs: NavigationVoice) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
NavigationZoomViewModel
ViewModel of the SwiftUI control for changing the map scale in the navigator.
Extends: ObservableObject
Methods
NavigatorFollowManager
Extends: INavigatorFollowManager
public init(map: Map, followMode: NavigatorFollowMode, driveType: NavigatorFollowDriverType = .vehicle)
Parameters
Methods
public func toggleFollowMode()
Switches the follow mode to the next available one.
public func addFollowModeObserver(_ observer: @escaping FollowModeObserver) -> INavigatorFollowManagerObservation
Parameters
Properties
NewValuesNotifier
Object interface that reports that there is a change in one of the parameters.
Extends: Hashable
public static func == (lhs: NewValuesNotifier, rhs: NewValuesNotifier) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func sendNotification()
Must be called to report a parameter update.
ObstacleInfoRouteAttribute
Container that describes a point attribute of a route. Each item is stored as a point on the route, in which the item is located, and the value of the item itself.
Extends: Hashable
public static func == (lhs: ObstacleInfoRouteAttribute, rhs: ObstacleInfoRouteAttribute) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [ObstacleInfoRouteEntry]
Elements that fall within the [begin, end) range.
Parameters
public func findNearBackward(
point: RoutePoint
) -> ObstacleInfoRouteEntry?
Find the nearest element with position < = point.<br/>The operation complexity is log2(N), where N = size.
Parameters
public func findNearForward(
point: RoutePoint
) -> ObstacleInfoRouteEntry?
Find the nearest element with position < = point.<br/>The operation complexity is log2(N), where N = size.
Parameters
Properties
var size
Number of elements.
var isEmpty
Elements missing.
var first
First element.
var last
Last element.
var entries
All elements.
ObstacleInfoRouteLongAttribute
Container that stores an extended route attribute. Each element is stored as a pair consisting of a point and an attribute element value. The action of the attribute starts at the given point and ends at the next point, starting from which the action of the attribute of the next element begins.
Extends: Hashable
public static func == (lhs: ObstacleInfoRouteLongAttribute, rhs: ObstacleInfoRouteLongAttribute) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func entry(
point: RoutePoint
) -> ObstacleInfoRouteLongEntry?
Element in which the point falls.
Parameters
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [ObstacleInfoRouteLongEntry]
Elements partially or completely covered by the [begin, end] segment.
Parameters
Properties
var size
Number of elements.
var isEmpty
Elements missing.
var first
First element.
var last
Last element.
var entries
All elements.
Package
Package. For the convenience of working (installing, updating, deleting), data in 2GIS SDK is grouped into sets according to its functional and logical purpose. A set of grouped data is called a package. Within a single package, the functional purpose of the data is unique. However, data sets of packages with the same functionality may overlap, i.e. data from several packages may have common files. During operations with a group of such packages, the shared data will be processed (downloaded, unpacked, deleted) only once.
Extends: Hashable
public static func == (lhs: Package, rhs: Package) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func install()
Start the package installation or update.
public func uninstall()
Start the package removal.
Properties
var id
Stable technical package ID.
var infoChannel
StatefulChannel<PackageInfo>
Package information.
var info
Package information.
var progressChannel
StatefulChannel<UInt8>
Progress of the package installation or update operation in percent. If the package is not installed locally, the channel contains a value of 0. If the package is installed locally, regardless of whether the data is up to date and compatible with the current SDK version, the channel contains the value 100. If the package is in the installation or upgrade phase, the channel contains an updatable value in the range [0, 100].
var progress
Progress of the package installation or update operation in percent. If the package is not installed locally, the channel contains a value of 0. If the package is installed locally, regardless of whether the data is up to date and compatible with the current SDK version, the channel contains the value 100. If the package is in the installation or upgrade phase, the channel contains an updatable value in the range [0, 100].
PackageManager
Interface for centralized management of packages:
Extends: Hashable
public static func == (lhs: PackageManager, rhs: PackageManager) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func checkForUpdates()
Forced check for updates.
Properties
var autoupdateEnabled
Status of auto update: enabled/disabled.
var packagesChannel
StatefulChannel<[Package]>
Channel with a list of all known packages. Refreshed if information about at least one of the packages is changed, or if the list composition is changed.
var packages
Channel with a list of all known packages. Refreshed if information about at least one of the packages is changed, or if the list composition is changed.
PackedMapState
Serialized map state.
Extends: Hashable
public static func == (lhs: PackedMapState, rhs: PackedMapState) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public static func of(
position: CameraPosition,
showTraffic: Bool,
behaviour: CameraBehaviour
) -> PackedMapState
Gets map status.
Parameters
position
Camera position.
showTraffic
Traffic display state on the map.
behaviour
Camera tracking mode.
Returns
PackedMapStateSerialized map state.
public static func fromBytes(
data: Data
) throws -> PackedMapState
Gets map status.
Parameters
public static func fromMap(
map: Map
) -> PackedMapState
Gets map status.
Parameters
public func toBytes() -> Data
Represents map state as a sequence of bytes.
Returns
Data
Properties
var showTraffic
Gets the state of the traffic display on the map.
var cameraPosition
Obtains the camera position.
var cameraBehaviour
Gets the camera tracking mode.
PackedNavigationState
Auxiliary object for serialization and deserialization of the navigation state.
Extends: Hashable
public static func == (lhs: PackedNavigationState, rhs: PackedNavigationState) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public static func of(
trafficRoute: TrafficRoute,
routeSearchOptions: RouteSearchOptions? = nil,
finishPoint: RouteSearchPoint? = nil,
routePosition: RoutePoint? = nil,
state: State = State.disabled
) -> PackedNavigationState
Creates an object from the listed elements.
Parameters
trafficRoute
routeSearchOptions
finishPoint
routePosition
state
Returns
public static func fromBytes(
data: Data
) throws -> PackedNavigationState
Deserialization of the navigation state. Invalid elements in the saved state are skipped or replaced by default values.
Parameters
public static func fromModel(
model: Model
) -> PackedNavigationState
Creates an object from the navigator model.
Parameters
public func toBytes() -> Data
Serialization of the navigation state.
Returns
Data
Properties
var trafficRoute
Route.
var finishPoint
Finish point of the route.
var routeSearchOptions
Route building options.
var routePosition
Position on the route.
var state
Current navigation state.
PackedSearchQuery
Auxiliary object for serializing and deserializing a search query.
Extends: Hashable
public static func == (lhs: PackedSearchQuery, rhs: PackedSearchQuery) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public static func fromBytes(
data: Data
) throws -> PackedSearchQuery
Deserialization of a search query.
Parameters
public static func fromSearchQuery(
searchQuery: SearchQuery
) -> PackedSearchQuery
Parameters
public func toBytes() -> Data
Returns
Data
public func toSearchQuery() -> SearchQuery
Returns
Properties
var queryText
Query text. For some queries (e.g., revealing a rubric from a suggest), there is no text because the query stores identifiers, and the behavior is different than searching the text of a suggest element.
var orgId
Organization identifier.
var rubricIds
Rubrics identifiers.
var objectIds
Objects identifiers.
var buildingId
Building identifier.
var spatialRestriction
Geometry limiting the search area.
var areaOfInterest
Rectangular area of interest.
var allowedResultTypes
Restriction on the object types returned by the search.
var pageSize
Int32
The size of the output page.
var directoryFilter
Information about active filters.
var sortingType
Type of result sorting.
var geoPoint
Center of the search area.
var radius
Search radius in meters.
var locale
Search query locale.
var searchNearby
Search for objects near the user. Increases the importance of distance from the user in search results.
Page
Page with search results.
Extends: Hashable
public static func == (lhs: Page, rhs: Page) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func fetchPrevPage() -> Future<Page?>
Gets the previous page of results.
public func fetchNextPage() -> Future<Page?>
Gets the next page of results.
Properties
var items
The non-empty set of directory objects of this page.
ParkingControlModel
Model of the parking lots control.<p>This interface is thread-safe.
Extends: Hashable
public static func == (lhs: ParkingControlModel, rhs: ParkingControlModel) -> Bool
Returns a Boolean value indicating whether two values are equal.<br/>This documentation comment was inherited from .
public convenience init(
map: Map
)
Function to create a model for the parking lots control.
Parameters
map
Map.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by feeding them into the given hasher.
Parameters
hasher
Hasher
The hasher to use when combining the components of this instance.
public func toggleParkingsVisibility()
Action upon tapping the UI control. Switches the parking lots visibility on the map.
Properties
var isEnabledChannel
StatefulChannel<Bool>
State of the parking lots visibility control. true if parking lots are visible.
var isEnabled
State of the parking lots visibility control. true if parking lots are visible.
PerformSearchHandler
Looking for a specific set of objects is suggested.
Extends: Hashable
public static func == (lhs: PerformSearchHandler, rhs: PerformSearchHandler) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
Properties
var searchQuery
Query to run through a search engine.
PointGeometry
Polygon
Polygon on the map.
Extends: SimpleMapObject
public convenience init(
options: PolygonOptions
) throws
Creates a polygon based on parameters.
Parameters
options
Properties
PolygonGeometry
Polyline
Polyline on the map.
Extends: SimpleMapObject
Properties
var points
var width
var color
var erasedPart
var dashedPolylineOptions
Getting dashed polyline parameters.
var gradientPolylineOptions
Gets gradient polyline parameters.
PolylineGeometry
Projection
Projection.
Extends: Hashable
public static func == (lhs: Projection, rhs: Projection) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func screenToMap(
point: ScreenPoint
) -> GeoPoint?
Calculates a map point at the specified screen point.<br/>The function returns an empty value if the specified screen point is outside the map projection.
Parameters
public func mapToScreen(
point: GeoPointWithElevation
) -> ScreenPoint?
Calculates a screen point corresponding to the specified map point with elevation.<br/>The function returns an empty value:
Parameters
public func screenToMapClipped(
point: ScreenPoint
) -> GeoPoint
Calculates the map point closest to the projection of the specified screen point.
Parameters
public func distanceOnMap(
fromPoint: ScreenPoint,
toPoint: ScreenPoint
) -> Meter?
Calculates the distance in meters between points on the map that correspond to the specified points on the screen.<br/>Returns an empty value if one or both points on the screen are outside the map projection.
Parameters
public func distanceOnScreen(
fromGeoPoint: GeoPoint,
toGeoPoint: GeoPoint
) -> LogicalPixel?
Calculates the distance in pixels between points on the screen that correspond to the specified points on the map.<br/>Returns an empty value if one or both points on the map are:<ul><li>invalid values (`latitude` is outside the range `-90; 90` or `longitude` is outside the range `-180; 180`)</li><li>above the projection plane of the map on the screen</li><li>far beyond the screen, and the type overflow occurs</li></ul>
Parameters
PublicTransportTransferRouteLongAttribute
Container that stores an extended route attribute. Each element is stored as a pair consisting of a point and an attribute element value. The action of the attribute starts at the given point and ends at the next point, starting from which the action of the attribute of the next element begins.
Extends: Hashable
public static func == (lhs: PublicTransportTransferRouteLongAttribute, rhs: PublicTransportTransferRouteLongAttribute) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func entry(
point: RoutePoint
) -> PublicTransportTransferRouteLongEntry?
Element in which the point falls.
Parameters
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [PublicTransportTransferRouteLongEntry]
Elements partially or completely covered by the [begin, end] segment.
Parameters
Properties
var size
Number of elements.
var isEmpty
Elements missing.
var first
First element.
var last
Last element.
var entries
All elements.
RangeWidget
Widget for presenting a continuous or discrete set of sorted values.
Extends: Widget
Methods
Properties
var range
Gets a set of sorted values.
RasterTileSource
Source that gets raster tiles.
Extends: Source
public convenience init(
context: Context,
sublayerName: String,
sourceTemplate: RasterUrlTemplate
)
Creates a source that gets raster tiles.
Parameters
context
Context.
sublayerName
Name to be used during objects generation.
This name must be specified in the filter condition of a raster style layer for the db_sublayer attribute.
Example: ["match", <a href="#">get,db_sublayer</a>, <a href="#">NAME</a>, true, false]
For details, see the specification: https://docs.2gis.com/en/mapgl/stylespecification
sourceTemplate
Template for requesting tiles.
Methods
public func setOpacity(
opacity: Opacity
)
Sets the transparency value of a raster tile.
Parameters
opacity
Remover
Object for removing user-created content.
Extends: Hashable
public static func == (lhs: Remover, rhs: Remover) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func remove() -> Future<ActionResult>
Removing content.<br/>The action is available only for the content authored by the user.
Returns
Future<>
RoadEvent
Road event.
Extends: Hashable
public static func == (lhs: RoadEvent, rhs: RoadEvent) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func photos() -> Future<[RoadEventPhoto]>
Event photo.
Properties
var type
Event type.
var id
Event identifier.
var name
Localized event name.
Information about the user who added the event.
var timestamp
Date?
Event creation timestamp.
var location
Event coordinates.
var description
User description of the road event.
var cameraInfo
Camera information.<br/>Available for events of the “Camera” type only.
var schedule
Schedule.<br/>Currently only available for road closures (not always).
var lanes
Lanes affected by the event.<br/>Currently can be specified for custom events only.
var availableActions
List of available actions with the event.
var remover
Obtains an object to delete an event.
RoadEventAction
Event action.
Extends: Hashable
public static func == (lhs: RoadEventAction, rhs: RoadEventAction) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func `set`() -> Future<ActionResult>
Applying an action (for example, adding a “like” mark or confirming an event).<br/>There are opposite actions, for example, “like” and “dislike”. If both of such actions are available for an event, calling the method resets the application of the opposite action so that one cannot “like” and “dislike” at the same time.
Returns
Future<>
public func reset() -> Future<ActionResult>
Cancels an action (for example, resetting a “like” mark or revoking event confirmation).<br/>There are opposite actions, for example, “like” and “dislike”. If both of such actions are available for an event, calling the method does not cause the application of the opposite action.
Returns
Future<>
Properties
var type
Type of action.
var name
Localized name of the action.
var infoChannel
StatefulChannel<RoadEventActionInfo>
Action information.
var info
Action information.
RoadEventManager
Object for creating transport events.
Extends: Hashable
public static func == (lhs: RoadEventManager, rhs: RoadEventManager) -> Bool
Returns a Boolean value indicating whether two values are equal.<br/>This documentation comment was inherited from .
public convenience init(
context: Context
)
Gets an object to create road events.
Parameters
context
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by passing them to the given hasher.
Parameters
hasher
Hasher
Hasher to use when combining the components of this instance.
public func createAccident(
location: GeoPoint,
lanes: LaneOptionSet,
description: String
) -> Future<AddEventResult>
Creating a “Road accident” event.
Parameters
location
Event location.
lanes
Lanes of the road affected by the event.
description
Custom event description.
Returns
Future<>
public func createCamera(
location: GeoPoint,
description: String
) -> Future<AddEventResult>
Creates a “Camera” event.
Parameters
public func createRoadRestriction(
location: GeoPoint,
description: String
) -> Future<AddEventResult>
Creates a “Road closure” event.
Parameters
public func createComment(
location: GeoPoint,
description: String
) -> Future<AddEventResult>
Creates a “Comment” event.
Parameters
public func createOther(
location: GeoPoint,
lanes: LaneOptionSet,
description: String
) -> Future<AddEventResult>
Creates an “Other” event.
Parameters
location
Event location.
lanes
Lanes of the road affected by the event.
description
Custom event description.
Returns
Future<>
public func createRoadWorks(
location: GeoPoint,
lanes: LaneOptionSet,
description: String
) -> Future<AddEventResult>
Creates a “Road works” event.
Parameters
location
Event location.
lanes
Lanes of the road affected by the event.
description
Custom event description.
Returns
Future<>
RoadEventMapObject
“Road event” map object.
Extends: MapObject
Properties
var id
var event
Obtains a road event.
var animationSettings
Gets settings of road event animation for reading and editing.
RoadEventMapObjectRouteAttribute
Container that describes a point route attribute.
Each element is stored as a route point, in which this element is located, and the value of the element.
Extends: Hashable
public static func == (lhs: RoadEventMapObjectRouteAttribute, rhs: RoadEventMapObjectRouteAttribute) -> Bool
Returns a Boolean value indicating whether two values are equal.
Methods
public func hash(into hasher: inout Hasher)
Hashes the essential components of this value by feeding them into the given hasher.
Parameters
hasher
Hasher
The hasher to use when combining the components of this instance.
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [RoadEventMapObjectRouteEntry]
Elements that fit into the [begin, end) interval.
Parameters
public func findNearBackward(
point: RoutePoint
) -> RoadEventMapObjectRouteEntry?
Find the closest element with the position <= point.<p>Operation complexity: log2(N), where N = size.</p>
Parameters
public func findNearForward(
point: RoutePoint
) -> RoadEventMapObjectRouteEntry?
Find the closest element with the position <= point.<p>Operation complexity: log2(N), where N = size.</p>
Parameters
Properties
var size
Number of elements.
var isEmpty
Elements are missing.
var first
First element.
var last
Last element.
var entries
All elements.