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
)
Расширение навигатора, которое отслеживает активность пользователя и выдает сигнал, когда пользователь перестал пользоваться навигатором и его можно выключить.
Parameters
platformContext
Контекст.
model
Модель навигатора, состояние которого отслеживается.
speedBound
Верхняя граница скорости в м/с, при превышении которой в состоянии Finished навигатора считается, что навигатор активен, т.е. движение продолжается.
timeThreshold
TimeInterval
Время, в течение которого в состоянии Finished навигатора отслеживается скорость движения ниже пороговой для определения состояния неактивности навигатора. Если в течение этого времени скорость движения меньше установленного порога или нет данных о локации и скорости, навигатор считается неактивным.
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 stopChannel
StatefulChannel<Bool>
Флаг, активное состояние которого указывает на то, что навигатор необходимо остановить. Если в состоянии Finished навигация прекращается, т.е. движение останавливается или его скорость становится ниже порогового значения, и если такое состояние сохраняется некоторое время, то устанавливается флаг уста навливается в true, в противном случае он имеет значение false.
var stop
Флаг, активное состояние которого указывает на то, что навигатор необходимо остановить. Если в состоянии Finished навигация прекращается, т.е. движение останавливается или его скорость становится ниже порогового значения, и если такое состояние сохраняется некоторое время, то устанавливается флаг устанавливается в true, в противном случае он имеет значение false.
AlternativeRouteSelector
Выбор альтернативного маршрута.
Extends: Hashable
public static func == (lhs: AlternativeRouteSelector, rhs: AlternativeRouteSelector) -> 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.
public func selectAlternativeRoute(
trafficRoute: TrafficRoute
)
Выбор альтернативного маршрута. Если переданный маршрут не соответствует одному из актуальных альтернативных маршрутов, ничего не происходит. В противном случае соответствующий альтернативный маршрут становится текущим активным маршрутом.
Parameters
trafficRoute
Альтернативный маршрут, который должен быть выбран в качестве текущего активного маршрута.
AlternativeRoutesProviderSettings
Настройки поиска альтернативных маршрутов и маршрута лучше.
Extends: Hashable
public static func == (lhs: AlternativeRoutesProviderSettings, rhs: AlternativeRoutesProviderSettings) -> 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 alternativeRoutesEnabled
Флаг включения/выключения предложения альтернативных маршрутов. По умолчанию предложение альтернативных маршрутов включено.
var betterRouteEnabled
Флаг включения/выключения п редложения маршрута лучше. По умолчанию предложение маршрута лучше включено.
var routeSearchDelay
Задержка перед поиском альтернативных маршрутов при старте поездки по маршруту или после перехода на какой-либо другой маршрут. Должна быть не меньше 5 секунд. По умолчанию 20 секунд.
var betterRouteTimeCostThreshold
Минимальная разница во времени движения между исходным маршрутом и альтернативным маршрутом, при которой альтернативный маршрут считается маршрутом лучше.
var betterRouteLengthThreshold
Минимальная суммарная длина рёбер маршрута, которые отличаются между исходным маршрутом и альтернативным маршрутом, при которой альтернативный маршрут считается маршрутом лучше.
var routerType
Тип поисковика для поиска альтернативных маршрутов.
AnimationSettings
Настройки анимаций объектов карты. Применяются для слоев стилей, в которых указан источник модели. Например, такими слоями являются слои с типами “3D model” и “Directional model”. Индекс анимации должен быть обязательно указан для анимированной модели.
Extends: Hashable
public static func == (lhs: AnimationSettings, rhs: AnimationSettings) -> 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 animationIndex
Int32?
Индекс текущей анимации модели. Если null, то используется значение из стилей. Если в стилях значение не задано или задано отрицательное, никакая анимация не проигрывается.
var animationName
Название текущей анимации модели. Если null, то используется значение из стилей. Если в стилях значение не задано, никакая анимация не проигрывается.
var sceneIndex
Int32?
Индекс текущей сцены модели. Если null, то используется значение из стилей. Если в стилях значение не задано или задано отрицательное, используется сцена по умолчанию, которая определена в самой модели.
var sceneName
Название текущей сцены модели. Если null, то используется значение из стилей. Если в стилях значение не задано, используется сцена по умолчанию, которая определена в самой модели.
var animationRepeatCount
Int32?
Количество повторений анимации модели. Если null, то используется значение из стилей. Если в стилях значение не задано или задано отрицательное, анимация будет проигрываться бесконечно.
var animationSpeed
Float?
Скорость проигрывания анимации модели. Если null, то используется значение из стилей. Значения больше единицы ускоряют проигрывание, меньше замедляют. Если в стилях значение не задано, используется скорость по умолчанию.
Attributes
Интерфейс для управления свойствами объекта карты.
Extends: Hashable
public static func == (lhs: Attributes, rhs: Attributes) -> 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.
public func setAttributeValue(
name: String,
value: AttributeValue
)
Установка свойства.
Parameters
public func setAttributeValues(
values: [String: AttributeValue],
attributesToRemove: [String] = []
)
Установка набора свойств. Сначала удаляются свойства attributes_to_remove, затем добавляются свойства values. Если свойство с таким названием уже было добавлено, то оно заменяется.
Parameters
values
String[ : ]
Набор пар “имя”:“значение” для добавляемых свойства.
attributesToRemove
Список имён свойств, которые нужно удалить.
public func removeAttribute(
name: String
)
Удаление свойства.
Parameters
name
Имя свойства для удаления.
public func getAttributeValue(
name: String
) -> AttributeValue
Получение свойства.
Parameters
Properties
var attributeNames
Получение списка свойств.
var changed
Channel<[String]>
Получение канала, уведомляющего об изменении свойств.
AudioSettings
Класс для управления звуком.<br/>Все методы могут вызываться из любого потока.
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
Уровень громкости звука (0-100).
var mute
Проигрывание звука отключено.
var audioFocusPolicy
Поведения звуков других приложений при запрошенном фокусе.
BaseCamera
Камера.
Extends: Hashable
public static func == (lhs: BaseCamera, rhs: BaseCamera) -> 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.
public func setPosition(
position: CameraPosition
) throws
Установка новой позиции камеры.<br/>Вызов прерывает перелёт и обработку жестов, а также сбрасывает слежение за позицией, стилевым уровнем масштабирования, наклоном и направлением.
Parameters
position
public func changePosition(
positionChange: CameraPositionChange
) throws
Изменение только части параметров позиции камеры.<br/>Вызов прерывает перелёт и обработку жестов, а также сбрасывает слежение за изменёнными параметрами, а при изменении координат также и слежение за стилевым уровнем масштабирования и направлением.
Parameters
positionChange
public func setZoomRestrictions(
zoomRestrictions: CameraZoomRestrictions
) throws
Функция устанавливает новый диапазон ограничений уровня масштабирования.
Parameters
zoomRestrictions
Новый диапазон ограничений уровня масштабирования.
public func setPositionPoint(
positionPoint: CameraPositionPoint
) throws
Функция устанавливает новую позицию относительно области экрана, ограниченной отступами.
Parameters
positionPoint
новая позиция относительно области экрана, ограниченной отступами.
public func setViewPoint(
viewPoint: CameraViewPoint?
) throws
Функция устанавливает новую точку взгляда относительно полного размера вьюпорта.
Parameters
viewPoint
новая точка взгляда относительно полного размера вьюпорта. Будет следовать за точкой позиции, если передан nil.
Properties
var projection
Проекция.
var positionChannel
StatefulChannel<CameraPosition>
Получение текущей позиции камеры.
var position
Получение текущей позиции камеры.
var zoomRestrictionsChannel
StatefulChannel<CameraZoomRestrictions>
Получение актуальных ограничений уровня масштабирования.
var zoomRestrictions
Получение актуальных ограничений уровня масштабирования.
var deviceDensityChannel
StatefulChannel<DeviceDensity>
Получение отношения DPI к базовому DPI устройства.
var deviceDensity
Получение отношения DPI к базовому DPI устройства.
var sizeChannel
StatefulChannel<ScreenSize>
Получение размера области просмотра.
var size
Получение размера области просмотра.
var paddingChannel
StatefulChannel<Padding>
Получен ие текущих отступов от краёв экрана.
var padding
Получение текущих отступов от краёв экрана.
var positionPointChannel
StatefulChannel<CameraPositionPoint>
Точка экрана, к которой привязана позиция камеры, задаётся с учётом отступов (padding).
var positionPoint
Точка экрана, к которой привязана позиция камеры, задаётся с учётом отступов (padding).
var viewPoint
Точка взгляда относительно полного размера вьюпорта.
var visibleArea
Область пересечения пирамиды видимости камеры и поверхности карты.
var visibleRectChannel
StatefulChannel<GeoRect>
Объемлющий прямоугольник видимой области карты.
var visibleRect
Объемлющий прямоугольник видимой области карты.
var maxTiltRestrictionChannel
StatefulChannel<StyleZoomToTiltRelation?>
Получение текущей функции зависимости максимального угла наклона камеры от стилевого уровня масштабирования.
var maxTiltRestriction
Получение текущей функции зависимости максимального угла наклона камеры от стилевого уровня масштабирования.
var viewportRestrictionChannel
StatefulChannel<GeoRect?>
Получение ограничения на область видимости.
var viewportRestriction
Получение ограничения на область видимости.
BearingFollowController
Контроллер слежения за направлением карты.
Extends: FollowController
public convenience init(
bearingSource: BearingSource,
animationDuration: TimeInterval = 1,
valueThreshold: Bearing = Bearing(value: 1)
)
Создание контроллера слежения за направлением карты.
Parameters
bearingSource
источник информации о направлении.
animationDuration
TimeInterval
неотрицательная длительность изменения реального направления.
valueThreshold
неотрицательное пороговое значение учитываемого изменения реального направления.
BoolRouteLongAttribute
Контейнер, который хранит протяженный атрибут маршрута. Каждый элемент хранится в виде пары, состоящей из точки и значения элемента атрибута. Действие атрибута начинается с данной точки и заканчива ется в следущей точке, начиная с которой начинается действие атрибута следующего элемента.
Extends: Hashable
public static func == (lhs: BoolRouteLongAttribute, rhs: BoolRouteLongAttribute) -> 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.
public func entry(
point: RoutePoint
) -> BoolRouteLongEntry?
Элемент, в который попадает заданная точка.
Parameters
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [BoolRouteLongEntry]
Элементы, частично или полностью покрываемые отрезком [begin, end].
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
BufferedChannel
Extends: Channel<Value>
Properties
var value
Value?
Camera
Камера для запуска перемещения карты и настроек слежения.
Extends: BaseCamera
Methods
public func move(
moveController: CameraMoveController
) -> Future<CameraAnimatedMoveResult>
Запуск перемещения карты.<br/>Сбрасывает текущий режим слежения карты и прерывает обработку жестов.
Parameters
public func move(
position: CameraPosition,
time: TimeInterval = 0.3,
animationType: CameraAnimationType = CameraAnimationType.`default`
) -> Future<CameraAnimatedMoveResult>
Запуск анимированного перемещения карты с использованием встроенного контроллера перемещений карты.<br/>Сбрасывает слежение за позицией, уровнем масштабирования, наклоном и направлением и прерывает обработку жестов.
Parameters
position
Конечная позиция камеры.
time
TimeInterval
Время, выделенное на перемещение карты.
animationType
Тип анимации при перемещении камеры.
Returns
Future<>
public func move(
point: GeoPoint,
zoom: Zoom,
tilt: Tilt?,
bearing: Bearing,
time: TimeInterval = 0.3,
animationType: CameraAnimationType = CameraAnimationType.`default`
) -> Future<CameraAnimatedMoveResult>
Запуск анимированного перемещения карты с использованием встроенного контроллера перемещений карты.
Parameters
point
точка конечной позиции камеры
zoom
уровень масштабирования в конечной позиции камеры
tilt
наклон в конечной позиции камеры или пустое значение, если нужно в зависимости от активного режима слежения использовать значение из follow controller’а или текущее значение
bearing
поворот в конечной позиции камеры
time
TimeInterval
время, выделенное на перемещение карты
animationType
тип анимации при перемещении камеры
Returns
Future<>
public func processMovementAndStop()
Установка позиции камеры в соответствие с текущим временем и прекращение анимированного перемещения.<br/>Вызов прерывает перелёт и обработку жестов, а также сбрасывает слежение за позицией, уровнем масштабирования и направлением.
public func setBehaviour(
behaviour: CameraBehaviour
)
Смена режима слежения камеры. Если новый режим более ограниченный, чем текущий, вызов прервёт перелёт и обработку жестов.
Parameters
behaviour
public func addFollowController(
followController: FollowController
)
Добавление контроллера слежения.
Parameters
followController
public func removeFollowController(
followController: FollowController
)
Удаление контроллера слежения.
Parameters
followController
public func setCustomFollowController(
followController: CustomFollowController
)
Добавление контроллера слежения, реализованного на платформе.
Parameters
followController
public func removeCustomFollowController()
Удаление контроллера слежения, реализованного на платформе.
Properties
var stateChannel
StatefulChannel<CameraState>
Получение актуального состояния камеры.
var state
Получение актуального состояния камеры.
var behaviourChannel
StatefulChannel<CameraBehaviourChange>
Режим слежения камеры.
var behaviour
Режим слежения камеры.
CameraNotifier
Предупреждает о попадании в зону действия дорожной камеры.
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
)
Расширение навигатора, которое предупреждает о попадании в зону действия дорожной камеры.
Parameters
model
Модель навигатора, состояние которого отслеживается.
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 cameraProgressChannel
StatefulChannel<CameraProgressInfo?>
Прогресс прохождения зоны действия дорожной камеры.
var cameraProgress
Прогресс прохождения зоны действия дорожной камеры.
CameraRouteAttribute
Контейнер, который описывает точечный атрибут маршрута. Каждый элемент хранится в виде точки на маршруте, в которой этот элемент расположен и значения самого элемента.
Extends: Hashable
public static func == (lhs: CameraRouteAttribute, rhs: CameraRouteAttribute) -> 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.
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [CameraRouteEntry]
Элементы, попадающие в отрезок [begin, end).
Parameters
public func findNearBackward(
point: RoutePoint
) -> CameraRouteEntry?
Найти ближайший элемент, позиция которого < = point.<br/>Сложность операции log2(N), где N = size.
Parameters
public func findNearForward(
point: RoutePoint
) -> CameraRouteEntry?
Найти ближайший элемент, позиция которого >= point.<br/>Сложность операции log2(N), где N = size.
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
CancelEvent
Cancellable
A 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.<br/>This documentation comment was inherited from .
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 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.
Channel
public static func ==(lhs: Channel<Value>, rhs: Channel<Value>) -> Bool
Returns a Boolean value indicating whether two values are equal.<br/>This documentation comment was inherited from .
Methods
public func sink(
receiveValue: @escaping (Value) -> Void
) -> Cancellable
Subscribe to a stream of values over time. The subscription never fails.
Returns
CancellableA cancellable 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 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.
func sinkOnMainThread(_ receiveValue: @escaping (Value) -> Void) -> Cancellable
Получение результата `Channel` на `main` очереди.
Returns
func sink(on queue: DispatchQueue, receiveValue: @escaping (Value) -> Void) -> Cancellable
Получение результата `Channel` на заданной очереди.
Parameters
CheckableGroupedItem
Единичный элемент из GroupCheckableItem.
Extends: Hashable
public static func == (lhs: CheckableGroupedItem, rhs: CheckableGroupedItem) -> 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.
CheckableItem
Базовое представление отмечаемого элемента из CheckableItemsGroup.
Extends: Hashable
public static func == (lhs: CheckableItem, rhs: CheckableItem) -> 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 type
Получение типа отмечаемого элемента.
var filterType
Получение списка фильтров, описывающих текущее состояние виджета. Может быть использован при формировании поискового запроса.
CheckableItemsGroup
Виджет для представления группы отмечаемых элементов.
Extends: Widget
Properties
var items
Получение группы элементов виджета.
Checkbox
Виджет-чекбокс.
Extends: Widget
Properties
var filterType
Получение типа фильтра, который представляет виджет.
var checkedText
Получение текста подписи для “отмеченного” чекбокса.
var uncheckedText
Получение текста подписи для “неотмеченного” чекбокса.
var values
Получение списка значений, по которым происходит фильтрация. Обычно одно значение.
var isChecked
Получение состояния виджета.
Circle
Окружность.
Extends: SimpleMapObject
Methods
public func setPosition(
position: GeoPoint
) throws
Установка местоположения центра окружности.
Parameters
position
Properties
var position
Местоположение центра окружности.
var radius
Радиус окружности.
var color
Цвет заливки окружности.
var strokeWidth
Ширина линии границы окружности.
var strokeColor
Цвет границы окружности.
var dashedStrokeOptions
Получение параметров пунктирной обводки
ClusterObject
Кластер объектов.
Extends: MapObject
Properties
var position
Получение позиции кластера на карте.
var objectCount
Получение количества маркеров в кластере.
var objects
Получение списка маркеров в кластере.
var geometryObject
Получение геометрического объекта кластера.
CompassControl
CompassControlModel
Модель контрола компаса. Контрол состоит из кнопки компаса, при нажатии на которую камера карты меняет угол в направлении севера. Если камера карты смотрит на сервер, то контрол необходимо скрывать. Потокобезопасно.
Extends: Hashable
public static func == (lhs: CompassControlModel, rhs: CompassControlModel) -> 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.
public func onClicked()
Properties
CompassViewModel
ViewModel для контрола компаса
Extends: ObservableObject
Methods
public func onClicked()
ComplexGeometry
Составная геометрия, состоит из набора простых или составных геометрий.
Extends: Geometry
Properties
var elements
Container
Центральный объект для доступа к возможностям iOS Mobile SDK.
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
)
Конструктор контейнера.
Parameters
keySource
Настройки ключа для доступа к сервисам 2ГИС.
logOptions
Настройки логирования.
httpClientForRequest
Сетевой клиент для отправки HTTP-запросов.
httpOptions
Настройки HTTP-клиента (такие как кеширование).
locationProvider
Источник геопозиции. Если передать nil, то будет использоваться источник по умолчанию.
magneticHeadingProvider
Источник направления магнитной стрелки. Если передать nil, то будет использоваться источник по умолчанию.
personalDataCollectionOptions
Настройки сервиса сбора данных.
vendorConfig
Переопределения настроек для работы в автономном окружении.
Methods
public func makeDirectoryViewsFactory() throws -> IDirectoryViewsFactory
Создать фабрику SwiftUI элементов справочника.
Returns
public func makeMapFactory(
options: MapOptions
) throws -> IMapFactory
Parameters
options
Первоначальные свойства карты. Укажите `.default` для быстрого создания онлайн-карты, смотрящей на Москву, с фиксированным неточным PPI (не соответствующим текущему устройству).
Returns
public func makeRouteEditorFactory() throws -> IRouteEditorFactory
Создать фабрику редактора маршрутов.
Returns
public func makeRoadEventCardViewFactory(options: RoadEventCardViewOptions = .default) throws -> IRoadEventCardViewFactory
Создать фабрику UIKit карточки дорожного события.
Parameters
public func makeRoadEventViewFactory(options: RoadEventCardViewOptions = .default) throws -> IRoadEventViewFactory
Создать фабрику SwiftUI карточки дорожного события.
Parameters
Properties
var context
Корневой непрозрачный контейнер объектов SDK. Используется в качестве аргумента к API SDK.
var markerViewFactory
Фабрика UIView маркеров для карты.
var styleFactory
Конструктор стандартных и пользовательских стилей.
var searchManagerFactory
Фабрика поисковиков по справочнику.
var sourceFactory
Фабрика источников данных карты.
var imageFactory
Фабрика изображений для объектов карты.
var modelFactory
Фабрика моделей для объектов карты.
var localeManager
Менеджер региональных настроек приложения.
var locationService
Объект для работы с установленным при инициализации SDK источником геопозиции.
let httpOptions
Настройки HTTP-клиента.
var audioSettings
Объект для настройки звуков.
var voiceManager
Объект для взаимодействия со списком голосовых пакетов навигатора.
Context
Контекст - окружение, необходимое для работы SDK.
Extends: Hashable
public static func == (lhs: Context, rhs: Context) -> 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.
CoordinatesFollowController
Контроллер слежения за координатами позиции карты.
Extends: FollowController
public convenience init(
animationDuration: TimeInterval = 1,
valueThreshold: Meter = Meter(value: 0.10000000149011612)
)
Создание контроллера слежения за координатами позиции карты.
Parameters
animationDuration
TimeInterval
длительность изменения реальной позиции.
valueThreshold
неотрицательное пороговое значение учитываемого изменения реальной позиции.
CreateRoadEventControl
Блок для создания дорожных событий.
Extends: UIControl
Methods
public override func layoutSubviews()
Properties
var intrinsicContentSize
CurrentLocationControl
Блок с функцией перелёта к текущему местоположению.
Extends: UIControl
Methods
public override func layoutSubviews()
Properties
var intrinsicContentSize
CurrentLocationViewModel
ViewModel для контрола текущего местоположения.
Extends: ObservableObject
Methods
public func onClicked()
DgisMapObject
Объект карты 2GIS.<br/>информацию об объекте можно получить через справочник (directory)
Extends: MapObject
Properties
var id
Стабильный числовой идентификатор объекта.
DgisSource
Основной интерфейс источников данных 2ГИС.
Extends: Source
Methods
public static func createDgisSource(
context: Context,
workingMode: DgisSourceWorkingMode = DgisSourceWorkingMode.hybridOnlineFirst
) -> Source
Создание источника, получающего д анные с серверов 2ГИС или использующего в работе предварительно загруженные данные.
Parameters
public func setHighlighted(
directoryObjectIds: [DgisObjectId],
highlighted: Bool
)
Установка или снятие выделения объектов.<br/>добавляет объекту атрибут “selected”, который можно использовать в стилях.
Parameters
directoryObjectIds
Идентификаторы изменяемых объектов.
highlighted
Установка или снятие выделения.
Properties
var highlightedObjectsChannel
StatefulChannel<[DgisObjectId]>
Получение списка идентификаторов выделенных объектов.
var highlightedObjects
Получение списка идентификаторов выделенных объектов.
DirectMapControlBeginEvent
Событие начала прямого управления картой. Сообщает карте, что необходимо обрабатывать события прямого управления картой. События прямого управления работают только от DirectMapControlBeginEvent до DirectMapControlEndEvent. После завершения последовательности событий прямого управления может запуститься кинематика. Кинематика использует время возникновения события, поэтому лучше использовать время, полученное от системы, а не заполнять значение при обработке. Пока кинематика работает только для перемещения карты, но не для вращения и масштабирования.
Extends: Event
public convenience init()
DirectMapControlEndEvent
Событие окончания прямого управления картой. Завершает прямое управление картой, начатое после получения события DirectMapControlBeginEvent. О событиях прямого управления картой описано в DirectMapControlBeginEvent.
Extends: InputEvent
public convenience init(
timestamp: TimeInterval
)
Parameters
timestamp
TimeInterval
DirectMapRotationEvent
Событие прямого вращения карты. О событиях прямого управления картой описано в DirectMapControlBeginEvent.
Extends: InputEvent
public convenience init(
bearingDelta: Bearing,
timestamp: TimeInterval,
rotationCenter: ScreenPoint? = nil
)
Parameters
bearingDelta
изменение угла поворота карты, в градусах. Положительные значения соответствуют напр авлению вращения против часовой стрелки
timestamp
TimeInterval
Время генерации системного события.
rotationCenter
Точка на экране, вокруг которой вращается карта. Если точка не задана, то вращение происходит относительно точки позиции карты.
Properties
var bearingDelta
Изменение угла поворота карты.
var rotationCenter
Точка на экране, вокруг которой вращается карта.
DirectMapScalingEvent
Событие прямого масштабирования карты. События прямого управления картой описаны в DirectMapControlBeginEvent.
Extends: InputEvent
public convenience init(
zoomDelta: Float,
timestamp: TimeInterval,
scalingCenter: ScreenPoint? = nil
)
Parameters
zoomDelta
Float
Величина, на которую изменится текущее значение масштаба.
timestamp
TimeInterval
Время генерации системного события.
scalingCenter
Точка на экране, относительно которой масштабируется карта. Если точка не задана, то масштабирование происходит относительно точки позиции карты.
Properties
var zoomDelta
Float
Величина, на которую изменится текущее значение масштаба.
var scalingCenter
Точка на экране, относительно которой масштабируется карта.
DirectMapShiftEvent
Событие прямого сдвига карты. События прямого управления картой описаны в DirectMapControlBeginEvent.
Extends: InputEvent
public convenience init(
screenShift: ScreenShift,
shiftedPoint: ScreenPoint,
timestamp: TimeInterval
)
Parameters
screenShift
Изменение экранной позиции карты относительно предыдущей, в пикселях.
shiftedPoint
Центральная точка, от которой производится смещение карты.
timestamp
TimeInterval
Время генерации системного события.
Properties
var screenShift
Изменение экранной позиции карты.
var shiftedPoint
Центральная точка, от которой производится смещение карты.
DirectMapTiltEvent
Событие прямого наклона камеры. События прямого управления картой описаны в DirectMapControlBeginEvent.
Extends: InputEvent
public convenience init(
delta: Float,
timestamp: TimeInterval
)
Parameters
delta
Float
Изменение угла наклона в градусах.
timestamp
TimeInterval
Время генерации системного события.
Properties
var delta
Float
Изменение угла наклона в градусах.
DirectoryObject
Объект справочника.
Extends: Hashable
public static func == (lhs: DirectoryObject, rhs: DirectoryObject) -> 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.
public func formattedAddress(
type: FormattingType
) -> FormattedAddress?
Cтроковое представление адреса, отформатированное в соответствии с указанным требованием к длине.
Parameters
public func publicTransportScheduleInfo(
departureTimeUtc: UInt64
) -> Future<PublicTransportDirectoryScheduleInfo?>
Информация о расписаниях платформ и направлений.
Parameters
departureTimeUtc
Время в системе UNIX по UTC, на которое необходимо получить расписание.
Returns
PublicTransportDirectoryScheduleInfo<?>
Properties
var types
Тип объекта. Может быть несколько, например, ТЦ Сан Сити - филиал организации и здание одновременно. Первый тип в этом списке - основной.
var title
Заголовок объекта.
var titleAddition
Дополнительная информация заголовка Пример: “(кв. 1-12)”<br/>Для получения данной информации запросите дополнительную настройку ключа.
var subtitle
Подзаголовок объекта.<br/>при отсутствии может быть пустой строкой
var description
Описание объекта.
var id
Стабильный числовой идентификатор объекта.
var markerPosition
Точка объекта, где следует разместить маркер.
var address
Адрес объекта в виде набора компонент.
var attributes
Дополнительные атрибуты объекта.
var contextAttributes
Контекстные дополнительные атрибуты объекта.
var timeZoneOffset
Сдвиг локального времени объекта относительно UTC в секундах в текущий момент.
var openingHours
Время работы объекта.
var contactInfos
Контакты объекта.
var reviews
Отзывы.
var parkingInfo
Дополнительная информация о парковке.
var workStatus
Статус работы.
var levelId
Идентификатор этажа, на котором расположен объект.<br/>Для получения данной информации запросите дополнительную настройку ключа.
var buildingLevels
Информация об этажных планах здания.<br/>Для получения данной информации запросите дополнительную настройку ключа.
var entrances
Информация о входах.<br/>Для получения данной информации запросите дополнительную настройку ключа.
var tradeLicense
Данные о лицензии организации.<br/>Для получения данной информации запросите дополнительную настройку ключа.
var buildingInfo
Информация о здании.
var chargingStation
Атрибуты для электрозаправки.
var rubricIds
Идентификаторы рубрик.
var orgInfo
Информация об организации.
var group
Связанные в объединённую карточку объекты.<br/>Для получения данной информации запросите дополнительную настройку ключа.
var routeInfos
Справочная информация о маршрутах общественного транспорта. Поле заполняется только при поиске по идентификатору объекта.
var platformIds
Справочная информация о идентификаторах платформ общественного транспорта. Поле заполняется только при поиске по идентификатору объекта.
DoubleRouteAttribute
Контейнер, который описывает точечный атрибут маршрута. Каждый элемент хранится в виде точки на маршруте, в которой этот элемент расположен и значения самого элемента.
Extends: Hashable
public static func == (lhs: DoubleRouteAttribute, rhs: DoubleRouteAttribute) -> 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.
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [DoubleRouteEntry]
Элементы, попадающие в отрезок [begin, end).
Parameters
public func findNearBackward(
point: RoutePoint
) -> DoubleRouteEntry?
Найти ближайший элемент, позиция которого < = point.<br/>Сложность операции log2(N), где N = size.
Parameters
public func findNearForward(
point: RoutePoint
) -> DoubleRouteEntry?
Найти ближайший элемент, позиция которого >= point.<br/>Сложность операции log2(N), где N = size.
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
DynamicRouteInfoSettings
Настройки получения динамических данных о маршруте.
Extends: Hashable
public static func == (lhs: DynamicRouteInfoSettings, rhs: DynamicRouteInfoSettings) -> 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 updatePeriod
Периодичность, с которой должны обновляться динамические данные о маршруте.
Event
Базовый класс для всех обрабатываемых событий.
Extends: Hashable
public static func == (lhs: Event, rhs: Event) -> 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.
ExceedSpeedLimitSettings
Настройки обнаружения превышения максимальной разрешённой скорости.
Extends: Hashable
public static func == (lhs: ExceedSpeedLimitSettings, rhs: ExceedSpeedLimitSettings) -> 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 exceedSpeedNotificationEnabled
Включение/выключение детектирования превышения максимальной разрешённой скорости.
var allowableSpeedExcess
Float
Разрешённое превышение скорости в м/с, по умолчанию равно 0.
File
Идентификатор файла.
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 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.
FloatRouteLongAttribute
Контейнер, который хранит протяженный атрибут маршрута. Каждый элемент хранится в виде пары, состоящей из точки и значения элемента атрибута. Действие атрибута начинается с данной точки и заканчивается в следущей точке, начиная с которой начинается действие атрибута следующего элемента.
Extends: Hashable
public static func == (lhs: FloatRouteLongAttribute, rhs: FloatRouteLongAttribute) -> 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.
public func entry(
point: RoutePoint
) -> FloatRouteLongEntry?
Элемент, в который попадает заданная точка.
Parameters
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [FloatRouteLongEntry]
Элементы, частично или полностью покрываемые отрезком [begin, end].
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
FollowController
Класс, позволяющий управлять положением камеры. Реализации всех его методов должны быть потокобезопасны. У большинства методов есть тривиальные реализации по умолчанию (таким образом FollowController, отвечающий за масштаб, не обязан переопределять методы coordinates() и т.п.). Один контроллер может быть единомоментно добавлен только в одну карту.
Extends: Hashable
public static func == (lhs: FollowController, rhs: FollowController) -> 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.
FreeRoamSelector
Контроллер перевода навигатора в режим FreeRoam при слишком долгом перестроении маршрута.
Extends: Hashable
public static func == (lhs: FreeRoamSelector, rhs: FreeRoamSelector) -> 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 enabled
FreeRoamSettings
Extends: Hashable
public static func == (lhs: FreeRoamSettings, rhs: FreeRoamSettings) -> 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 onRoutePrefetchLength
Тайлы дорожного графа загружаются в http-кэш во время ведения по маршруту, если они соответствуют участку маршрута от текущей позиции до указанного расстояния. Значение по умолчанию - 5 км.<br/>Загрузка тайлов в http-кэш не выполняется, если параметр соответствует нулевому или отрицательному расстоянию.
var onRoutePrefetchRadiusMeters
При кэшировании тайлов дорожного графа во время ведения по маршруту тайлы загружаются в http-кэш, если оказываются ближе заданного расстояния в метрах от линии маршрута. Значение по умолчанию - 1 км.<br/>Загрузка тайлов в http-кэш не выполняется, если параметр соответствует нулевому или отрицательному расстоянию.
var prefetchRadiusMeters
Тайлы дорожного графа загружаются в http-кэш если оказываются ближе заданного расстояния в метрах от текущей позиции. Значение по умолчанию - 2 км.<br/>Загрузка тайлов в http-кэш не выполняется, если параметр соответствует нулевому или отрицательному расстоянию.
Future
public init(
subscriber: @escaping Subscriber,
canceller: @escaping Canceller = {}
)
Parameters
subscriber
Subscriber
A function to create a new subscription.
canceller
Canceller
A function to release 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.<br/>This documentation comment was inherited from .
Methods
public func sink(
receiveValue: @escaping (Value) -> Void,
failure: @escaping (Error) -> Void
) -> Cancellable
Subscribe for a future value or an error.
Returns
CancellableA cancellable 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
Subscribe for a future value or an error.
Returns
CancellableA cancellable instance. Deallocation of the result will tear down the single value subscription.
static func makeReadyValue(_ value: Value) -> Future<Value>
Make an immediately ready future value.
Returns
Future<>
static func makeReadyError(message: String) -> Future<Value>
Make an immediately ready future error.
Parameters
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.
func sinkOnMainThread(
receiveValue: @escaping (Value) -> Void,
failure: @escaping (Error) -> Void
) -> DGis.Cancellable
Returns
CancellableDGis.
Geometry
Объект геометрии.
Extends: Hashable
public static func == (lhs: Geometry, rhs: Geometry) -> 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.
public func intersects(
geometry: Geometry
) -> Bool
Функция intersects позволяет определить, имеет ли данная геометрия пересечение с другим объектом геометрии
Parameters
Properties
var kind
var bounds
Прямоугольник минимального размера, содержащий геометрию.
var minPoint
Минимальнная точка ограничивающего прямоугольника.
var maxPoint
Максимальная точка ограничивающего прямоугольника.
GeometryMapObject
Геометрический объект карты.
Extends: MapObject
Properties
var geometryChannel
StatefulChannel<Geometry>
Геометрия объекта.
var geometry
Геометрия объекта.
var objectAttributes
Получение свойств объекта карты для чтения и изменения.
var isVisibleChannel
StatefulChannel<Bool>
Текущий флаг видимости объекта.
var isVisible
Текущий флаг видимости объекта.
var isDraggableChannel
StatefulChannel<Bool>
Текущий флаг перемещаемости объекта.
var isDraggable
Текущий флаг перемещаемости объекта.
var animationSettings
Получение настроек анимации. Применяется для объектов с типом “3D model” или “Directional model”.
var bounds
Прямоугольник минимального размера, содержащий геометрию.
GeometryMapObjectBuilder
Класс для установки свойств и последующего создания геометрических объектов.
Extends: Hashable
public static func == (lhs: GeometryMapObjectBuilder, rhs: GeometryMapObjectBuilder) -> Bool
Returns a Boolean value indicating whether two values are equal.<br/>This documentation comment was inherited from .
public convenience init()
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.
public func setObjectAttribute(
name: String,
value: AttributeValue
) -> GeometryMapObjectBuilder
Установка свойства объекта карты.
Parameters
name
Имя свойства объекта карты.
value
Значение свойства объекта карты.
Returns
public func setObjectAttributes(
values: [String: AttributeValue]
) -> GeometryMapObjectBuilder
Установка свойств объекта карты.<br/>метод не заменяет весь набор свойств объекта, т.е. если свойство в values отсутствует, но уже добавлено в объект ранее, оно не будет изменено.
Parameters
values
String[ : ]
набор пар “имя”:“значение” для добавляемых свойства объекта карты
Returns
public func setGeometry(
geometry: Geometry
) -> GeometryMapObjectBuilder
Установка геометрии объекта карты.
Parameters
public func setVisible(
visible: Bool
) -> GeometryMapObjectBuilder
Установка видимости объекта карты.
Parameters
public func setDraggable(
draggable: Bool
) -> GeometryMapObjectBuilder
Установка возможности перетаскивания объекта карты.
Parameters
public func setUserData(
userData: Any
) -> GeometryMapObjectBuilder
Установка пользовательских данных.<br/>пользовательские данные никак не используются в SDK и нужны только чтобы возвращать их пользователю.
Returns
public func createObject() -> GeometryMapObject
Конструирование объекта карты.
Returns
GeometryMapObjectSource
Источник геометрических объектов карты.
Extends: Source
Methods
public func clusteringObjects(
position: CameraPosition
) -> [MapObject]
Получить список объектов, участвующих в кластеризации при переданной позиции камеры. В списке будут присутствовать как кластеры, так и геометрические объекты.
Parameters
public func addObject(
item: GeometryMapObject
)
Добавление объекта в источник.
Parameters
public func addObjects(
objects: [GeometryMapObject]
)
Добавление нескольких объектов в источник.
Parameters
objects
public func removeObject(
item: GeometryMapObject
)
Удаление объекта из источника.<br/>Удаление асинхронное, потокобезопасное, метод можно использовать из любого потока.
Parameters
public func removeObjects(
objects: [GeometryMapObject]
)
Удаление объектов из источника.
Parameters
objects
public func removeAndAddObjects(
objectsToRemove: [GeometryMapObject],
objectsToAdd: [GeometryMapObject]
)
Удаление и добавление объектов в источник.
Parameters
public func clear()
Удаление всех объектов из источника.
Properties
var objects
Получить все объекты, добавленные в источник.
var sourceAttributes
Получение значений свойств по умолчанию для всех объектов, добавленных в источник (см. IAttributes).
GeometryMapObjectSourceBuilder
Extends: Hashable
public static func == (lhs: GeometryMapObjectSourceBuilder, rhs: GeometryMapObjectSourceBuilder) -> 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.
public func setSourceAttribute(
name: String,
value: AttributeValue
) -> GeometryMapObjectSourceBuilder
Установка свойства объектов карты, общего для всего источника (см. ISource).
Parameters
public func setSourceAttributes(
values: [String: AttributeValue]
) -> GeometryMapObjectSourceBuilder
Установка свойств объектов карты, общих для всего источника.
Parameters
public func addObject(
item: GeometryMapObject
) -> GeometryMapObjectSourceBuilder
Добавление геометрического объекта карты в источник.
Parameters
public func addObjects(
objects: [GeometryMapObject]
) -> GeometryMapObjectSourceBuilder
Добавление нескольких геометрических объектов карты в источник.
Parameters
public func createSource() -> GeometryMapObjectSource
Создание источника геометрических объектов.<br/>после вызова этой функции использовать GeometryMapObjectSourceBuilder для создания источника данных или для задания параметров источника данных нельзя
Returns
GeoPointRouteAttribute
Контейнер, который описывает точечный атрибут маршрута. Каждый элемент хранится в виде точки на маршруте, в которой этот элемент расположен и значения самого элемента.
Extends: Hashable
public static func == (lhs: GeoPointRouteAttribute, rhs: GeoPointRouteAttribute) -> 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.
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [GeoPointRouteEntry]
Элементы, попадающие в отрезок [begin, end).
Parameters
public func findNearBackward(
point: RoutePoint
) -> GeoPointRouteEntry?
Найти ближайший элемент, позиция которого < = point.<br/>Сложность операции log2(N), где N = size.
Parameters
public func findNearForward(
point: RoutePoint
) -> GeoPointRouteEntry?
Найти ближайший элемент, позиция которого >= point.<br/>Сложность операции log2(N), где N = size.
Parameters
public func calculateGeoPoint(
routePoint: RoutePoint
) -> SegmentGeoPoint?
Вычисляет GeoPoint по известной RoutePoint.<br/>Сложность операции O(log2(N)), где N = route_geometry.size()
Parameters
routePoint
Returns
SegmentGeoPoint?Вычисленные географические координаты и направление сегмента, на который указывает параметр route_point. Если маршрут пустой или route_point выходит за пределы маршрута, то возвращается nil.
public func calculateClosestPoint(
point: GeoPoint
) -> RoutePoint?
Вычисляет ближайшую точку на маршруте к заданной в географических координатах точке.<br/>Сложность операции O(N), где N = route_geometry.size()
Parameters
point
Проецируемая на маршрут точка.
Returns
RoutePoint?Ближайшая точка на маршруте. Если маршрут пустой, либо точки range.first и range.second одновременно лежат либо до маршрута, либо после, то возвращается nil.
Properties
var size
Количес тво элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
var length
Длина маршрута.
GroupCheckableItem
Набор отмечаемых элементов, работающих как радио-группа.
Extends: CheckableItem
Properties
var items
Получение набора элементов группы.
HttpCacheManager
Интерфейс управления HTTP-кешем.
Extends: Hashable
public static func == (lhs: HttpCacheManager, rhs: HttpCacheManager) -> 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.
public func clear()
Очистка содержимого HTTP-кеша.
Image
Изображение.
Extends: Hashable
public static func == (lhs: Image, rhs: Image) -> 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.
IncompleteTextHandler
Предложено автодополнение для введенного пользователем текста.
Extends: Hashable
public static func == (lhs: IncompleteTextHandler, rhs: IncompleteTextHandler) -> 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 queryText
Нужно подставить в строку поиска этот текст и дать пользователю продолжить вводить запрос.
IndoorBuilding
Здание с этажными планами.
Extends: Hashable
public static func == (lhs: IndoorBuilding, rhs: IndoorBuilding) -> 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 id
Идентификатор здания с этажными планами.
var defaultLevelIndex
Индекс этажа по умолчанию.
var levels
Информация обо всех этажах.
var activeLevelIndexChannel
StatefulChannel<UInt64>
Порядковый индекс активного этажа в levels.
var activeLevelIndex
Порядковый индекс активного этажа в levels.
IndoorControl
Элемент управления этажами в здании.
Extends: UIControl
Methods
public override func layoutSubviews()
Properties
var focusedBuildingChangeCallback
(() -> ())?
Замыкание обратного вызова при изменении текущего здания.
var intrinsicContentSize
IndoorControlModel
Модель элемента управления этажами.
Extends: Hashable
public static func == (lhs: IndoorControlModel, rhs: IndoorControlModel) -> 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 activeLevelIndexChannel
StatefulChannel<UInt64?>
Индекс активного этажа.
var activeLevelIndex
Индекс активного этажа.
var markedLevels
Set<LevelId>
Этажи, на которых отображаются пометки.
var levelNamesChannel
StatefulChannel<[String]>
Названия этажей. Пусто, если на карте не отображается здание с этажными планами, или у здания всего один этаж.
var levelNames
Названия этажей. Пусто, если на карте не отображается здание с этажными планами, или у здания всего один этаж.
IndoorDetector
Детектор, который определяет находится ли пользователь в помещении.
Extends: Hashable
public static func == (lhs: IndoorDetector, rhs: IndoorDetector) -> 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 indoorChannel
StatefulChannel<Bool>
Канал, который оповещает о нахождении пользователя в помещении.
var indoor
Канал, который оповещает о нахождении пользователя в помещении.
IndoorManager
Класс для получения текущего здания с этажными планами.
Extends: Hashable
public static func == (lhs: IndoorManager, rhs: IndoorManager) -> 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.
public func setIndoorState(
newState: IndoorManagerState
)
Переключение включенности/выключенности менеджера этажных планов
Parameters
newState
Properties
var focusedBuildingChannel
StatefulChannel<IndoorBuilding?>
Получение текущего здания с этажными планами.
var focusedBuilding
Получение текущего здания с этажными планами.
IndoorRouteLevelsGetter
Позволяет получать множество этажей, через которые проходят маршруты, отображаемые на карте.
Extends: Hashable
public static func == (lhs: IndoorRouteLevelsGetter, rhs: IndoorRouteLevelsGetter) -> 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 levelIdsChannel
StatefulChannel<Set<LevelId>>
var levelIds
Set<LevelId>
IndoorViewModel
ViewModel для контрола этажей.
Extends: ObservableObject
InputEvent
Событие пользова тельского ввода.
Extends: Event
Properties
var timestamp
Получение времени регистрации события ввода.
InstructionRouteAttribute
Контейнер, который описывает точечный атрибут маршрута. Каждый элемент хранится в виде точки на маршруте, в которой этот элемент расположен и значения самого элемента.
Extends: Hashable
public static func == (lhs: InstructionRouteAttribute, rhs: InstructionRouteAttribute) -> 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.
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [InstructionRouteEntry]
Элементы, попадающие в отрезок [begin, end).
Parameters
public func findNearBackward(
point: RoutePoint
) -> InstructionRouteEntry?
Найти ближайший элемент, позиция которого < = point.<br/>Сложность операции log2(N), где N = size.
Parameters
public func findNearForward(
point: RoutePoint
) -> InstructionRouteEntry?
Найти ближайший элемент, позиция которого >= point.<br/>Сложность операции log2(N), где N = size.
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
IntRouteAttribute
Контейнер, который описывает точечный атрибут маршрута. Каждый элемент хранится в виде точки на маршруте, в которой этот элемент расположен и значения самого элемента.
Extends: Hashable
public static func == (lhs: IntRouteAttribute, rhs: IntRouteAttribute) -> 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.
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [IntRouteEntry]
Элементы, попадающие в отрезок [begin, end).
Parameters
public func findNearBackward(
point: RoutePoint
) -> IntRouteEntry?
Найти ближайший элемент, позиция которого < = point.<br/>Сложность операции log2(N), где N = size.
Parameters
public func findNearForward(
point: RoutePoint
) -> IntRouteEntry?
Найти ближайший элемент, позиция которого >= point.<br/>Сложность операции log2(N), где N = size.
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
ItemMarkerInfo
Идентификатор объекта и его координаты.
Extends: Hashable
public static func == (lhs: ItemMarkerInfo, rhs: ItemMarkerInfo) -> 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 objectId
var geoPoint
var floorInfo
var title
var rubricIds
var tradeLicense
Для получения данной информации запросите дополнительную настройку ключа.
LaneSignRouteLongAttribute
Контейнер, который хранит протяженный атрибут маршрута. Каждый элемент хранится в виде пары, состоящей из точки и значения элемента атрибута. Действие атрибута начинается с данной точки и заканчивается в следущей точке, начиная с которой начинается действие атрибута следующего элемента.
Extends: Hashable
public static func == (lhs: LaneSignRouteLongAttribute, rhs: LaneSignRouteLongAttribute) -> 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.
public func entry(
point: RoutePoint
) -> LaneSignRouteLongEntry?
Элемент, в который попадает заданная точка.
Parameters
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [LaneSignRouteLongEntry]
Элементы, частично или полностью покрываемые отрезком [begin, end].
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
LocaleManager
Менеджер региональных настроек приложения.
Extends: Hashable
public static func == (lhs: LocaleManager, rhs: LocaleManager) -> 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.
public func overrideLocales(
locales: [Locale]
)
Установка списка локалей приложения
Parameters
locales
Properties
var localesChannel
StatefulChannel<[Locale]>
Локали приложения, если заданы, иначе - локали, заданные пользователем в ОС.
var locales
Локали приложения, если заданы, иначе - локали, заданные пользователем в ОС.
var systemLocalesChannel
StatefulChannel<[Locale]>
Получение локалей, предоставляемых ОС.
var systemLocales
Получение локалей, предоставляемых ОС.
LocationService
Класс для работы с установленным при инициализации SDK источником геопозиции.
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?>
Канал, который оповещает об изменении геопозиции.
var lastLocation
Канал, который оповещает об изменении геопозиции.
Map
Карта.
Extends: Hashable
public static func == (lhs: Map, rhs: Map) -> 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.
public func setFontIconSizeMultiplier(
multiplier: Float
) throws
Установка множителя размера для иконок и шрифтов, полученный из приложения.<br/>через set_font_icon_size_multiplier можно задавать множитель размера иконок и шрифтов, без необходимости менять системный множитель и, соответственно, без влияния на размер иконок и шрифтов в других приложениях.
Parameters
multiplier
Float
public func resetFontIconSizeMultiplier()
Сбросить множитель размера для иконок.
public func addSource(
source: Source
)
Добавление источника данных на карту.<br/>Происходит асинхронно. Метод может вызываться из любого потока, потокобезопасен.
Parameters
source
public func removeSource(
source: Source
)
Удаление источника данных из карты.<br/>Происходит асинхронно. Метод может вызываться из любого потока, потокобезопа сен.
Parameters
source
public func getRenderedObjects(
centerPoint: ScreenPoint,
radius: ScreenDistance = ScreenDistance(value: 1)
) -> Future<[RenderedObjectInfo]>
Получение отображаемых объектов карты, проецирующихся на окружность на экране.<br/>Список объектов формируется в порядке отрисовки от поздних к ранним.
Parameters
centerPoint
центр окружности.
radius
радиус окружности.
Returns
RenderedObjectInfo<[]>
public func sublayerAttributes(
sublayerName: String
) -> Attributes
Получение атрибутов подслоя.<br/>Полученные атрибуты содержат только добавленные туда ранее (явно).
Parameters
Properties
var id
Идентификатор экземпляра карты, уникальный в рамках процесса.
var camera
Получение камеры.
var indoorManager
Получение менеджера этажных планов.
var dataLoadingStateChannel
StatefulChannel<MapDataLoadingState>
Нотификация о состоянии загружаемых в карту данных.<br/>При слежении за позицией камеры состояние карты всегда будет MapDataLoadingState::Loading.
var dataLoadingState
Нотификация о состоянии загружаемых в карту данных.<br/>При слежении за позицией камеры состояние карты всегда будет MapDataLoadingState::Loading.
var styleChannel
StatefulChannel<Style>
Получение текущих стилей карты.
var style
Получение текущих стилей карты.
var fontIconSizeMultiplierChannel
StatefulChannel<Float>
Множитель размера иконок и шрифтов, полученный из приложения.
var fontIconSizeMultiplier
Float
Множитель размера иконок и шрифтов, полученный из приложения.
var sources
Получение источников данных карты.<br/>Происходит асинхронно. Метод может вызываться из любого потока, потокобезопасен.
var mapVisibilityStateChannel
StatefulChannel<MapVisibilityState>
var mapVisibilityState
var attributes
Получение атрибутов.<br/>должны быть указаны свойства: “theme”=“day|night” “navigatorOn”=“true|false”
var interactiveChannel
StatefulChannel<Bool>
Интерактивность карты. Под интерактивностью понимается наличие у пользователя возможности взаимодействия с картой. При отключении интерактивности карта перестанет реагировать на события ввода, пришедшие от пользователя. Также перестанут работать контролы для работы с картой (приближения и перехода к текущему положению). При этом остаётся возможность работать с картой через set_position/move. При переходе в неинтерактивное состояние незавершённые жесты будут сброшены. По умолчанию карта интерактивна (interactive == true).<br/>функция может быть вызвана из любого потока.
var interactive
Интерактивность карты. Под интерактивностью понимается наличие у пользователя возможности взаимодействия с картой. При отключении интерактивности карта перестанет реагировать на события ввода, пришедшие от пользователя. Также перестанут работать контролы для работы с картой (приближения и перехода к текущему положению). При этом остаётся возможность работать с картой через set_position/move. При переходе в неинтерактивное состояние незавершённые жесты будут сброшены. По умолчанию карта интерактивна (interactive == true).<br/>функция может быть вызвана из любого потока.
var graphicsPresetHintChannel
StatefulChannel<GraphicsPreset?>
Получение рекомендуемого режима графики для данного устройства.
var graphicsPresetHint
Получение рекомендуемого режима графики для данного устройства.
var graphicsPresetChannel
StatefulChannel<GraphicsPreset?>
Получение режима графики. В случае nil используется рекомендуемый режим. Если определить рекомендуемый режим не удалось, то используется Normal.
var graphicsPreset
Получение режима графики. В случае nil используется рекомендуемый режим. Если определить рекомендуемый режим не удалось, то используется Normal.
MapLocationController
Контроллер для управления позиционированием карты в навигаторе.
Extends: Hashable
public static func == (lhs: MapLocationController, rhs: MapLocationController) -> 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 mapToNorthOrientation
Включена ли принудительная ориентация карты на север.
MapManager
Интерфейс, позволяющий добавлять карты в навигатор и убирать их из него.
Extends: Hashable
public static func == (lhs: MapManager, rhs: MapManager) -> 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.
MapMarkerViewModel
Extends: ObservableObject
public init(
id: UUID,
position: GeoPointWithElevation,
anchor: Anchor,
offsetX: CGFloat,
offsetY: CGFloat
)
Parameters
MapObject
Объект на карте.
Extends: Hashable
public static func == (lhs: MapObject, rhs: MapObject) -> 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 userData
Any
Произвольные пользовательские данные, прикрепленные к объекту.
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
)
Создать IMapObjectManager.
Parameters
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.
public static func withClustering(
map: Map,
logicalPixel: LogicalPixel,
maxZoom: Zoom,
clusterRenderer: SimpleClusterRenderer,
minZoom: Zoom = Zoom(value: 0),
layerId: String? = nil
) -> MapObjectManager
Создать IMapObjectManager с кластеризацией данных. Кластеризуются только IMarker объекты.
Parameters
map
logicalPixel
Минимально возможное расстояние на экране между точками привязки маркеров на уровнях, где работает кластеризация.
maxZoom
Уровень, начиная с которого видны все маркеры.
clusterRenderer
Интерфейс для задания параметров отображения кластера.
minZoom
Уровень, начиная с которого формируются кластеры.
layerId
ID слоя в стиле типа “Динамический объект”. Создаваемые объекты будут размещены на этом слое, тем самым можно задать их порядок относительно других слоев. Если не задан, объекты размещаются поверх остальных слоев.
Returns
public static func withGeneralization(
map: Map,
logicalPixel: LogicalPixel,
maxZoom: Zoom,
minZoom: Zoom = Zoom(value: 0),
layerId: String? = nil
) -> MapObjectManager
Создать IMapObjectManager с генерализацией данных. Генерализуются только IMarker объекты.
Parameters
map
logicalPixel
Минимально возможное расстояние на экране между точками привязки маркеров на уровнях, где работает генерализация.
maxZoom
Уровень, начиная с которого видны все маркеры.
minZoom
Уровень, начиная с которого работает генерализация.
layerId
ID слоя в стиле типа “Динамический объект”. Создаваемые объекты будут размещены на этом слое, тем самым можно задать их порядок относительно других слоев. Если не задан, объекты размещаются поверх остальных слоев.
Returns
public func addObjects(
objects: [SimpleMapObject]
)
Добавить объекты.
Parameters
objects
public func removeObjects(
objects: [SimpleMapObject]
)
Удалить объекты.
Parameters
objects
public func removeAndAddObjects(
objectsToRemove: [SimpleMapObject],
objectsToAdd: [SimpleMapObject]
)
Удалить и добавить объекты.
Parameters
public func removeAll()
public func clusteringObjects(
position: CameraPosition
) -> [MapObject]
Получить список объектов, участвующих в кластеризации при переданной позиции камеры. В списке будут присутствовать как кластеры, так и маркеры.
Parameters
Properties
var isVisible
Переопределение видимости всех объектов, добавленных в экземпляр менеджера. Значение false здесь имеет приоритет над видимостью отдельного объекта.
MapObjectTappedCallback
Класс для хранения функции обратного вызова, которая вызывается при клике на карту.
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.<br/>This documentation comment was inherited from .
Methods
MapRotationBeginEvent
Событие начала вращения карты вокруг точки.
Extends: Event
public convenience init(
inDirection: MapRotationDirection
)
Parameters
inDirection
Properties
var direction
MapRotationEndEvent
MapScalingBeginEvent
MapScalingEndEvent
MapShiftBeginEvent
MapShiftEndEvent
Marker
Точечная отметка на карте, представляющая интерес для пользователя.
Extends: SimpleMapObject
Properties
var position
Получение местоположения маркера.
var icon
Получение иконки маркера.
var anchor
Получение точки привязки иконки маркера.
var iconOpacity
Получение прозрачности иконки маркера.
var text
Получение подписи маркера.
var textStyle
Получение стиля подписи маркера.
var isDraggable
Получение ф лага перемещаемости маркера.
var iconWidth
Получение целевой ширины маркера, используемой для масштабирования.
var iconMapDirection
Угол поворота маркера на карте относительно направления на север, по часовой стрелке.
var animatedAppearance
Анимировать ли появление.
var iconAnimationMode
Получение режима анимации анимированного маркера.
MillisecondsRouteAttribute
Контейнер, который описывает точечный атрибут маршрута. Каждый элемент хранится в виде точки на маршруте, в кото рой этот элемент расположен и значения самого элемента.
Extends: Hashable
public static func == (lhs: MillisecondsRouteAttribute, rhs: MillisecondsRouteAttribute) -> 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.
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [MillisecondsRouteEntry]
Элементы, попадающие в отрезок [begin, end).
Parameters
public func findNearBackward(
point: RoutePoint
) -> MillisecondsRouteEntry?
Найти ближайший элемент, позиция которого < = point.<br/>Сложность операции log2(N), где N = size.
Parameters
public func findNearForward(
point: RoutePoint
) -> MillisecondsRouteEntry?
Найти ближайший элемент, позиция которого >= point.<br/>Сложность операции log2(N), где N = size.
Parameters
public func calculateDuration(
routePoint: RoutePoint
) -> TimeInterval
Parameters
public func calculateDuration(
fromRoutePoint: RoutePoint,
toRoutePoint: RoutePoint
) -> TimeInterval
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
var duration
Длительность маршрута.
MiniMapViewModel
Extends: ObservableObject
Model
Модель навигатора, предназначенная для отображения в UI.
Extends: Hashable
public static func == (lhs: Model, rhs: Model) -> 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.
public func betterRouteResponse(
response: BetterRouteResponse
)
Ответ пользователя о применении предложенного маршрута лучше.
Parameters
response
Properties
var stateChannel
StatefulChannel<State>
Состояние навигатора.
var state
Состояние навигатора.
var locationChannel
StatefulChannel<Location?>
Текущая геопозиция, с которой работает навигатор.
var location
Текущая геопозиция, с которой работает навигатор.
var locationAvailableChannel
StatefulChannel<Bool>
Флаг, который указывает используется ли текущая геопозия для навигации. После получения геопозиции навигатор решает пригодна ли она для того, чтобы использовать её для навигации (например, если у геопозиции слишком большая погрешность, навигатор может решить, что она не пригодна для навигации) Если геопозиция пригодна для навигации, навигатор выставляет в этом канале значение true, если не пригодна - false.<br/>Даже если значение в данном канале равно false, в канале location_channel геопозиция может обновляться.
var locationAvailable
Флаг, который указывает используется ли текущая геопозия для навигации. После получения геопозиции навигатор решает пригодна ли она для того, чтобы использовать её для навигации (например, если у геопозиции слишком большая погрешность, навигатор может решить, что она не пригодна для навигации) Если геопозиция пригодна для навигации, навигатор выставляет в этом канале значение true, если не пригодна - false.<br/>Даже если значение в данном канале равно false, в канале location_channel геопозиция может обновляться.
var routeChannel
StatefulChannel<RouteInfo>
Маршрут с манёврами.<br/>В режиме свободной езды (StateChannel::FreeRoam) отсутствует маршрут по которому движется пользователь. Поэтому участок дороги, по которой в данный момент движется пользователь, навигатор представляет в виде маршрута и отдает его как текущий маршрут. Такое описание дороги не является полноценным маршрутом, т.к. у него нет финиша и манёвров.
var route
Маршрут с манёврами.<br/>В режиме свободной езды (StateChannel::FreeRoam) отсутствует маршрут по которому движется пользователь. Поэтому участок дороги, по которой в данный момент д вижется пользователь, навигатор представляет в виде маршрута и отдает его как текущий маршрут. Такое описание дороги не является полноценным маршрутом, т.к. у него нет финиша и манёвров.
var dynamicRouteInfoChannel
StatefulChannel<DynamicRouteInfo>
Дорожные события и пробочные данные на маршруте или на прогнозируемой части маршрута для режима FreeRoam.
var dynamicRouteInfo
Дорожные события и пробочные данные на маршруте или на прогнозируемой части маршрута для режима FreeRoam.
var routePositionChannel
StatefulChannel<RoutePoint?>
Текущая позиция пользователя на маршруте.
var routePosition
Текущая позиция пользователя на маршруте.
var exceedingMaxSpeedLimitChannel
StatefulChannel<Bool>
Флаг превышения максимальной разрешенной скорости.
var exceedingMaxSpeedLimit
Флаг превышения максимальной разрешенной скорости.
var betterRouteChannel
StatefulChannel<BetterRouteInfo?>
Сигнал о нахождении альтернативного маршрута с меньшей ожидаемой длительностью движения. Если значение в канале равно nil, это значит, что альтернативный маршрут не найден, либо перестал быть актуальным.
var betterRoute
Сигнал о нахождении альтернативного маршрута с меньшей ожидаемой длительностью движения. Если значение в канале равно nil, это значит, что альтернативный маршрут не найден, либо перестал быть актуальным.
var distance
Measurement<UnitLength>?
Расстояние от текущей позиции до конца маршрута.
var duration
Время движения от текущей позиции до конца маршрута.
var isFreeRoam
ModelData
Данные модели.
Extends: Hashable
public static func == (lhs: ModelData, rhs: ModelData) -> 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.
ModelMapObject
Модель на карте.
Extends: SimpleMapObject
public convenience init(
options: ModelMapObjectOptions
) throws
Parameters
options
Properties
var position
Местоположения модели.
var modelData
Данные модели.
var opacity
Прозрачность модели.
var size
Размер модели.
var mapDirection
Угол поворота модели на карте относительно направления на север, по часовой стрелке.
var animationSettings
Настройки анимации.
MyLocationControlModel
Модель контрола перелета к местоположению пользователя. Контрол состоит из кнопки, при нажатии на которую камера перелетает к местоположению пользователя. Если местоположение не определено, ничего не происходит. Методы объекта необходимо вызывать на одном потоке.
Extends: Hashable
public static func == (lhs: MyLocationControlModel, rhs: MyLocationControlModel) -> 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.
public func onClicked()
Properties
var isEnabledChannel
StatefulChannel<Bool>
var isEnabled
var followStateChannel
StatefulChannel<CameraFollowState>
var followState
MyLocationMapObject
Маркер геопозиции.
Extends: MapObject
Methods
Properties
var animationSettings
Получение настроек анимации для чтения и изменения.
var objectAttributes
Получение свойств объекта карты для чтения и изменения.
MyLocationMapObjectSource
Источник, содержащий маркер геопозиции.
Extends: Source
public convenience init(
context: Context,
controllerSettings: MyLocationControllerSettings = MyLocationControllerSettings(),
markerType: MyLocationMapObjectMarkerType = MyLocationMapObjectMarkerType.model
)
Создать источник маркера геопозиции.
Parameters
Properties
var item
Получить маркер геопозиции.
MyLocationMapObjectSourceProvider
Провайдер, предоставляющий источник маркера геопозиции.
Extends: Hashable
public static func == (lhs: MyLocationMapObjectSourceProvider, rhs: MyLocationMapObjectSourceProvider) -> 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 myLocationMapObjectSource
Источник, содержащий маркер геопозиции.
NavigationFollowController
Интерфейс для управления слежением карты за маркером геопозиции в навигаторе.
Extends: Hashable
public static func == (lhs: NavigationFollowController, rhs: NavigationFollowController) -> 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.
public func setFollow(
follow: Bool
)
Немедленно включает либо отключает режим слежения карты за маркером геопозиции.
Parameters
follow
Properties
var followReturnDelay
Таймаут, через который карта автоматически вернется в режим слежения за маркером геопозиции после того, как пользователь подвигал её. 0 - автоматический возврат в режим слежения за маркером геопозиции отключен.
var cameraBehaviour
Режим слежения камеры за маркером геопозиции в навигаторе.
NavigationFollowingControl
Extends: UIControl
NavigationManager
Корневой публичный интерфейс навигатора.
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,
trafficRouter: TrafficRouter? = nil
) throws
Точка входа в API навигатора, используемая в SDK по умолчанию.
Parameters
platformContext
Контекст.
trafficRouter
Поисковик маршрута для использования внутри навигатора. Если не задан, по умолчанию используется гибридный поисковик.
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.
public func start() throws
Запускает ведение в режиме без маршрута (free roam). В этом режиме маршрут отсутствует, а навигатор сообщает об объектах, находящихся на дороге рядом с пользователем.
public func start(
routeBuildOptions: RouteBuildOptions,
trafficRoute: TrafficRoute? = nil
) throws
Запускает ведение по маршруту.
Parameters
routeBuildOptions
Параметры, с которыми навигатор будет перестраивать маршрут.
trafficRoute
Маршрут, по которому запускается ведение. Если значение не задано, то навигатор построит маршрут от текущей геопозиции.
public func startSimulation(
routeBuildOptions: RouteBuildOptions,
trafficRoute: TrafficRoute
) throws
Запускает симуляцию ведения по маршруту.
Parameters
routeBuildOptions
Параметры, с которыми навигатор будет перестраивать маршрут.
trafficRoute
Маршрут, по которому запускается симуляция.
public func stop()
Останавливает работу навигатора.
Properties
var uiModel
Модель навигатора, предназначенная для отображения в UI.
var indoorDetector
Навигация внутри помещений.
var mapFollowController
Управление автоматическим возвратом карты к слежению за маркером геопозиции.
var mapLocationController
Контроллер для управления позиционированием карты в навигаторе.
var mapManager
Менеджер карт навигатора.
var zoomFollowSettings
Настройки масштабирования карты во время режима ведения.
var routeMapSettings
Настройки отображения маршрута на карте.
var routeSourceSettings
Настройки источника, используемого для отображения маршрута на карте.
var routeMapObjectsProvider
Провайдер объектов маршрутов на карте.
var simulationSettings
Настройки симуляции ведения по маршруту.
var voiceSelector
Управление голосовыми пакетами в текущей сессии навигатора.
var exceedSpeedLimitSettings
Настройки детектирования превышения скорости.
var dynamicRouteInfoSettings
Настройки получения и обновления динамических данных о маршруте.
var soundNotificationSettings
Настройки звуковых оповещений в текущей сессии навигатора.
var freeRoamSettings
Настройки ведения без маршрута в режиме free roam.
var alternativeRoutesProviderSettings
Настройки поиска альтернативных маршрутов в режиме ведения.
var alternativeRouteSelector
Выбор альтернативного маршрута.
var myLocationMapObjectSourceProvider
Провайдер, предоставляющий источник маркера геопозиции.
var routeRebuilder
Контроллер поиска нового маршрута при сходе с текущего маршрута.
var freeRoamSelector
Контроллер перевода навигатора в режим FreeRoam при слишком долгом перестроении маршрута.
NavigationMiniMapViewModel
ViewModel для SwiftUI-элемента отображения миникарты в навигаторе.
Extends: ObservableObject
public init(
navigationManager: NavigationManager,
mapFactory: IMapFactory
) throws
Parameters
NavigationVoice
Голос для использования в навигаторе.
Extends: Hashable
public static func == (lhs: NavigationVoice, rhs: NavigationVoice) -> 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.
NavigationZoomViewModel
ViewModel SwiftUI-элемента для управления зумом в навигаторе.
Extends: ObservableObject
Methods
NavigatorFollowManager
Extends: INavigatorFollowManager
public init(map: Map, followMode: NavigatorFollowMode, driveType: NavigatorFollowDriverType = .vehicle)
Parameters
Methods
public func toggleFollowMode()
Переключает режим слежения на следующий доступный.<br/>This documentation comment was inherited from .
public func addFollowModeObserver(_ observer: @escaping FollowModeObserver) -> INavigatorFollowManagerObservation
Parameters
Properties
NewValuesNotifier
Интерфейс объекта, который сообщает о том, что есть изменения в каком-либо из параметров.
Extends: Hashable
public static func == (lhs: NewValuesNotifier, rhs: NewValuesNotifier) -> 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.
public func sendNotification()
Необходимо вызывать, чтобы сообщить об обновлении параметров.
ObstacleInfoRouteAttribute
Контейнер, который описывает точечный атрибут маршрута. Каждый элемент хранится в виде точки на маршруте, в которой этот элемент расположен и значения самого элемента.
Extends: Hashable
public static func == (lhs: ObstacleInfoRouteAttribute, rhs: ObstacleInfoRouteAttribute) -> 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.
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [ObstacleInfoRouteEntry]
Элементы, попадающие в отрезок [begin, end).
Parameters
public func findNearBackward(
point: RoutePoint
) -> ObstacleInfoRouteEntry?
Найти ближайший элемент, позиция которого < = point.<br/>Сложность операции log2(N), где N = size.
Parameters
public func findNearForward(
point: RoutePoint
) -> ObstacleInfoRouteEntry?
Найти ближайший элемент, позиция которого >= point.<br/>Сложность операции log2(N), где N = size.
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
ObstacleInfoRouteLongAttribute
Контейнер, который хранит протяженный атрибут маршрута. Каждый элемент хранится в виде пары, состоящей из точки и значения элемента атрибута. Действие атрибута начинается с данной точки и заканчивается в следущей точке, начиная с которой начинается действие атрибута следующего элемента.
Extends: Hashable
public static func == (lhs: ObstacleInfoRouteLongAttribute, rhs: ObstacleInfoRouteLongAttribute) -> 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.
public func entry(
point: RoutePoint
) -> ObstacleInfoRouteLongEntry?
Элемент, в который попадает заданная точка.
Parameters
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [ObstacleInfoRouteLongEntry]
Элементы, частично или полностью покрываемые отрезком [begin, end].
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
Package
Пакет. Для удобства работы с данными (установки, обновления, удаления), данные в 2ГИС SDK группируются в наборы по функционально-логическому назначению. Набор сгруппированных данных называется пакетом. В пределах одного пакета функциональное назначение данных уникально. Однако, множества данных пакетов с единым функциональным назначением могут пересекаться, то есть, возможна ситуация, когда данные нескольких пакетов имеют общие файлы. При операциях с группой таких пакетов общие данные будут обрабатываться (скачиваться, распаковываться, удаляться) только один раз.
Extends: Hashable
public static func == (lhs: Package, rhs: Package) -> 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.
public func install()
Запуск операции установки либо обновления пакета.
public func uninstall()
Запуск операции удаления пакета.
Properties
var id
Стабильный технический идентификатор пакета.
var infoChannel
StatefulChannel<PackageInfo>
Информация о пакете.
var info
Информация о пакете.
var progressChannel
StatefulChannel<UInt8>
Прогресс операции установки или обновления пакета в процентах. Если пакет не установлен локально, канал содержит значение 0. Если пакет установлен локально, независимо от актуальности данных и их совместимости с текущей версией SDK, канал содержит значение 100. Если пакет находится на этапе установки или обновления, канал содержит обновляемое значен ие в диапазоне [0, 100].
var progress
Прогресс операции установки или обновления пакета в процентах. Если пакет не установлен локально, канал содержит значение 0. Если пакет установлен локально, независимо от актуальности данных и их совместимости с текущей версией SDK, канал содержит значение 100. Если пакет находится на этапе установки или обновления, канал содержит обновляемое значение в диапазоне [0, 100].
PackageManager
Интерфейс для централизованной работы с пакетами:
Extends: Hashable
public static func == (lhs: PackageManager, rhs: PackageManager) -> 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.
public func checkForUpdates()
Принудительная проверка на наличие обновлений.
Properties
var autoupdateEnabled
Статус (включено/выключено) автообновления.
var packagesChannel
StatefulChannel<[Package]>
Канал со списком всех известных пакетов. Обновляется в случае изменения информации о хотя бы об одном из пакетов, либо при изменении состава списка.
var packages
Канал со списком всех известных пакетов. Обновляется в случае изменения информации о хотя бы об одном из пакетов, либо при изменении состава списка.
PackedMapState
Сериализованное состояние карты.
Extends: Hashable
public static func == (lhs: PackedMapState, rhs: PackedMapState) -> 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.
public static func of(
position: CameraPosition,
showTraffic: Bool,
behaviour: CameraBehaviour
) -> PackedMapState
Получение состояния карты.
Parameters
position
Позиция камеры.
showTraffic
Состояние отображения пробок на карте.
behaviour
Режим слежения камеры.
Returns
PackedMapStateСериализованное состояние карты.
public static func fromBytes(
data: Data
) throws -> PackedMapState
Получение состояния карты.
Parameters
data
Data
Состояние карты в виде последовательности байтов.
Returns
PackedMapStateСериализованное состояние карты.
public static func fromMap(
map: Map
) -> PackedMapState
Получение состояния карты.
Parameters
map
Карта, состояние которой необходимо получить.
Returns
PackedMapStateСериализованное состояние карты.
public func toBytes() -> Data
Представление состояния карты в виде последовательности байтов.
Returns
Data
Properties
var showTraffic
Получение состояния отображения пробок на карте.
var cameraPosition
Получение позиции камеры.
var cameraBehaviour
Получения режима слежения камеры.
PackedNavigationState
Вспомогательный объект для сериализации и десериализации состояния навигации.
Extends: Hashable
public static func == (lhs: PackedNavigationState, rhs: PackedNavigationState) -> 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.
public static func of(
trafficRoute: TrafficRoute,
routeSearchOptions: RouteSearchOptions? = nil,
finishPoint: RouteSearchPoint? = nil,
routePosition: RoutePoint? = nil,
state: State = State.disabled
) -> PackedNavigationState
Создание объекта из перечисленных элементов.
Parameters
trafficRoute
routeSearchOptions
finishPoint
routePosition
state
Returns
public static func fromBytes(
data: Data
) throws -> PackedNavigationState
Десериализация состояния навигации. Недопустимые элементы в сохранённом состоянии пропускаются либо заменяются значениями по умолчанию.
Parameters
public static func fromModel(
model: Model
) -> PackedNavigationState
Создание объекта из модели навигатора.
Parameters
public func toBytes() -> Data
Сериализация состояния навигации.
Returns
Data
Properties
var trafficRoute
Маршрут.
var finishPoint
Конечная точка маршрута.
var routeSearchOptions
Опции построения маршрута.
var routePosition
Позиция на маршруте.
var state
Текущее состояние навигации.
PackedSearchQuery
Вспомогательный объект для сериализации и десериализации поискового запроса.
Extends: Hashable
public static func == (lhs: PackedSearchQuery, rhs: PackedSearchQuery) -> 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.
public static func fromBytes(
data: Data
) throws -> PackedSearchQuery
Десериализация запроса поиска.
Parameters
public static func fromSearchQuery(
searchQuery: SearchQuery
) -> PackedSearchQuery
Parameters
public func toBytes() -> Data
Returns
Data
public func toSearchQuery() -> SearchQuery
Returns
Properties
var queryText
Текст запроса. Для нек оторых запросов (например, раскрытие рубрики из suggest’а) текст отсутствует, т.к. в запросе хранятся идентификаторы, и поведение отличается от поиска по тексту элемента suggest’а.
var orgId
Идентификатор организации.
var rubricIds
Идентификаторы рубрик.
var objectIds
Идентификаторы объектов.
var buildingId
Идентификатор здания.
var spatialRestriction
Геометрия, ограничивающая область поиска.
var areaOfInterest
Прямоугольная область интереса.
var allowedResultTypes
Ограничение по возвращаемым поиском типам объектов.
var pageSize
Int32
Размер страницы выдачи.
var directoryFilter
Информация об активных фильтрах.
var sortingType
Тип сортировки результатов.
var geoPoint
Центр для поискового запроса.
var radius
Радиус поиска в метрах.
var locale
Локаль поискового запроса.
var searchNearby
Указание поисковому движку использовать режим поиска рядом с пользователем. Сильно повышает значимость расстояния от пользователя.
Page
Страница результатов поиска.
Extends: Hashable
public static func == (lhs: Page, rhs: Page) -> 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.
public func fetchPrevPage() -> Future<Page?>
Получить предыдущую страницу результатов.
public func fetchNextPage() -> Future<Page?>
Получить следующую страницу результатов.
Properties
var items
Непустой набор объектов справочника этой страницы.
ParkingControlModel
Модель контрола парковок.<br/>Этот интерфейс является потокобезопасным.
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
)
Функция создания модели элемента управления парковками.
Parameters
map
карта.
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.
public func toggleParkingsVisibility()
Действие при нажатии на контрол. Переключает видимость парковок на карте.
Properties
var isEnabledChannel
StatefulChannel<Bool>
Состояние элемента управления видимостью парковок. true, если парковки видны.
var isEnabled
Состояние элемента управления видимостью парковок. true, если парковки видны.
PerformSearchHandler
Предложено поискать определенный набор объектов.
Extends: Hashable
public static func == (lhs: PerformSearchHandler, rhs: PerformSearchHandler) -> 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 searchQuery
Запрос для прогона через поисковик.
PointGeometry
Polygon
Полигон на карте.
Extends: SimpleMapObject
public convenience init(
options: PolygonOptions
) throws
Cоздание полигона на основе параметров.
Parameters
options
Properties
PolygonGeometry
Polyline
Ломаная линия на карте.
Extends: SimpleMapObject
Properties
var points
var width
var color
var erasedPart
var dashedPolylineOptions
Получение параметров пунктирной полилинии.
var gradientPolylineOptions
Получение параметров градиентной полилинии.
PolylineGeometry
Projection
Проекция.
Extends: Hashable
public static func == (lhs: Projection, rhs: Projection) -> 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.
public func screenToMap(
point: ScreenPoint
) -> GeoPoint?
Вычисление точки карты в указанной точке экрана.<br/>Функция возвращает пустое значение, если указанная точка экрана за пределами проекции карты.
Parameters
public func mapToScreen(
point: GeoPoint
) -> ScreenPoint?
Вычисление точки экрана, соответствующей указанной точке карты.<br/>Функция возвращает пустое значение:
Parameters
public func mapToScreen(
point: GeoPointWithElevation
) -> ScreenPoint?
Вычисление точки экрана, соответствующей указанной точке карты с высотой.<br/>Функция возвращает пустое значение:
Parameters
public func screenToMapClipped(
point: ScreenPoint
) -> GeoPoint
Вычисление ближайшей точки карты к проекции указанной точки экрана.
Parameters
public func distanceOnMap(
fromPoint: ScreenPoint,
toPoint: ScreenPoint
) -> Meter?
Вычисление расстояния между точками на карте, соответствующими указанным точкам на экране, в метрах.<br/>Функция возвращает пустое значение, если одна или обе указанных точки экрана находятся за пределами проекции карты.
Parameters
public func distanceOnScreen(
fromGeoPoint: GeoPoint,
toGeoPoint: GeoPoint
) -> LogicalPixel?
Вычисление расстояния между точками на экране, соответствующими ук азанным точкам на карте, в пикселях.<br/>Функция возвращает пустое значение если одна или обе точки на карте:
Parameters
PublicTransportTransferRouteLongAttribute
Контейнер, который хранит протяженный атрибут маршрута. Каждый элемент хранится в виде пары, состоящей из точки и значения элемента атрибута. Действие атрибута начинается с данной точки и заканчивается в следущей точке, начиная с которой начинается действие атрибута следующего элемента.
Extends: Hashable
public static func == (lhs: PublicTransportTransferRouteLongAttribute, rhs: PublicTransportTransferRouteLongAttribute) -> 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.
public func entry(
point: RoutePoint
) -> PublicTransportTransferRouteLongEntry?
Элемент, в который попадает заданная точка.
Parameters
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [PublicTransportTransferRouteLongEntry]
Элементы, частично или полностью покрываемые отрезком [begin, end].
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
RangeWidget
Виджет для представления непрерывного или дискретного набора упорядоченных значений.
Extends: Widget
Methods
Properties
var range
Получение набора упорядоченных значений.
RasterTileSource
Источник, получающий растровые тайлы.
Extends: Source
public convenience init(
context: Context,
sublayerName: String,
sourceTemplate: RasterUrlTemplate
)
Создание источника, получающего растровые тайлы.
Parameters
context
контекст.
sublayerName
имя, которое будет использовано при генерации объектов. Это имя должно быть указано в стилях в условии filter слоя типа raster для атрибута db_sublayer. Пример: [“match”, [“get”, “db_sublayer”], [“NAME”], true, false] Подробнее см. спецификацию: https://docs.2gis.com/en/mapgl/stylespecification
sourceTemplate
Шаблон для запроса тайлов.
Methods
public func setOpacity(
opacity: Opacity
)
Установка значения прозрачности растрового тайла.
Parameters
opacity
Remover
Объект для удаления пользовательского контента.
Extends: Hashable
public static func == (lhs: Remover, rhs: Remover) -> 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.
public func remove() -> Future<ActionResult>
Удаление контента.<br/>действие доступно для контента, автором которого является пользователь.
Returns
Future<>
RoadEvent
Дорожное событие.
Extends: Hashable
public static func == (lhs: RoadEvent, rhs: RoadEvent) -> 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.
public func photos() -> Future<[RoadEventPhoto]>
Фот ографии события.
Properties
var type
Тип события.
var id
Идентификатор события.
var name
Локализованное название события.
Информация о пользователе, добавившем событие.
var timestamp
Date?
Временная метка создания события.
var location
Координаты события.
var description
Пользовательское описание дорожного события.
var cameraInfo
Информация о камере.<br/>Доступна только для событий типа “Camera”.
var schedule
Расписание.<br/>На текущий момент доступно только для перекрытий, и даже для них может отсутствовать.
var lanes
Затронутые событием полосы.<br/>На текущий момент могут быть проставлены только у пользовательских событий.
var availableActions
Список доступных действий с событием.
var remover
Получение объекта для удаления события.
RoadEventAction
Действие события.
Extends: Hashable
public static func == (lhs: RoadEventAction, rhs: RoadEventAction) -> 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.
public func `set`() -> Future<ActionResult>
Применение действия (например, добавление отметки “нравится”, подтверждение события).<br/>Есть действия, противоположные друг другу, например, “нравится” и “не нравится”. Если для события доступны оба действия, вызов метода сбрасывает применение противоположного - невозможно одновременно поставить “нравится” и “не нравится”.
Returns
Future<>
public func reset() -> Future<ActionResult>
Отмена действия (например, сброс отметки “нравится”, сброс подтверждения события).<br/>Есть действия, противоположные друг другу, например, “нравится” и “не нравится”. Если для события доступны оба действия, вызов метода не вызывает применение противоположного действия.
Returns
Future<>
Properties
var type
Тип действия.
var name
Локализованное название действия.
var infoChannel
StatefulChannel<RoadEventActionInfo>
Информация о действии.
var info
Информация о действии.
RoadEventManager
Объект для создания транспортных событий.
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
)
Получение объекта для создания дорожных событий.
Parameters
context
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.
public func createAccident(
location: GeoPoint,
lanes: LaneOptionSet,
description: String
) -> Future<AddEventResult>
Создание события “ДТП”.
Parameters
location
Местоположение события.
lanes
Полосы дороги, затрагиваемые событием.
description
Пользовательское описание события.
Returns
Future<>
public func createCamera(
location: GeoPoint,
description: String
) -> Future<AddEventResult>
Создание события “Камера”.
Parameters
public func createRoadRestriction(
location: GeoPoint,
description: String
) -> Future<AddEventResult>
Создание события “Перекрытие дорожного движения”.
Parameters
public func createComment(
location: GeoPoint,
description: String
) -> Future<AddEventResult>
Создание события “Комментарий”.
Parameters
public func createOther(
location: GeoPoint,
lanes: LaneOptionSet,
description: String
) -> Future<AddEventResult>
Создание события “Другое”.
Parameters
location
Местоположение события.
lanes
Полосы дороги, затрагиваемые событием.
description
Пользовательское описание события.
Returns
Future<>
public func createRoadWorks(
location: GeoPoint,
lanes: LaneOptionSet,
description: String
) -> Future<AddEventResult>
Создание события “Дорожные работы”.
Parameters
location
Местоположение события.
lanes
Полосы дороги, затрагиваемые событием.
description
Пользовательское описание события.
Returns
Future<>
RoadEventMapObject
Объект карты “Дорожное событие”.
Extends: MapObject
Properties
var id
var event
Получение дорожного события.
var animationSettings
Получение настроек анимации дорожных событий для чтения и изменения.
RoadEventMapObjectRouteAttribute
Контейнер, который описывает точечный атрибут маршрута. Каждый элемент хранится в виде точки на маршруте, в которой этот элемент расположен и значения самого элемента.
Extends: Hashable
public static func == (lhs: RoadEventMapObjectRouteAttribute, rhs: RoadEventMapObjectRouteAttribute) -> 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.
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [RoadEventMapObjectRouteEntry]
Элементы, попадающие в отрезок [begin, end).
Parameters
public func findNearBackward(
point: RoutePoint
) -> RoadEventMapObjectRouteEntry?
Найти ближайший элемент, позиция которого < = point.<br/>Сложность операции log2(N), где N = size.
Parameters
public func findNearForward(
point: RoutePoint
) -> RoadEventMapObjectRouteEntry?
Найти ближайший элемент, позиция которого >= point.<br/>Сложность операции log2(N), где N = size.
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
RoadEventPhoto
Фотография дорожного события.
Extends: Hashable
public static func == (lhs: RoadEventPhoto, rhs: RoadEventPhoto) -> 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.
public func previewUrl(
desiredSize: ScreenSize
) -> String
URL превью фотографии.
Parameters
public func report() -> Future<ActionResult>
Отправка жалобы на фотографию.<br/>жалоба на свою фотографию ни к чему не приведёт.
Returns
Future<>
Properties
var photoUrl
URL полноразмерной фотографии.
Информация о пользователе, добавившем фотографию.
var timestamp
Date
Временная метка.
var remover
Получение объекта для удаления фотографии.
RoadEventRouteAttribute
Контейнер, который описывает точечный атрибут маршрута. Каждый элемент хранится в виде точки на маршруте, в которой этот элемент расположен и значения самого элемента.
Extends: Hashable
public static func == (lhs: RoadEventRouteAttribute, rhs: RoadEventRouteAttribute) -> 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.
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [RoadEventRouteEntry]
Элементы, попадающие в отрезок [begin, end).
Parameters
public func findNearBackward(
point: RoutePoint
) -> RoadEventRouteEntry?
Найти ближайший элемент, позиция которого < = point.<br/>Сложность операции log2(N), где N = size.
Parameters
public func findNearForward(
point: RoutePoint
) -> RoadEventRouteEntry?
Найти ближайший элемент, позиция которого >= point.<br/>Сложность операции log2(N), где N = size.
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
RoadEventSource
Интерфейс класса, управляющего отображением дорожных событий (tUGC) на карте.
Extends: Source
public convenience init(
context: Context
)
Создание источника, отображающего дорожные события на карте.
Parameters
context
Methods
public func setHighlighted(
directoryObjectIds: [DgisObjectId],
highlighted: Bool
)
Установка или снятие выделения дорожных событий.<br/>добавляет событию атрибут “selected”, который можно использовать в стилях.
Parameters
directoryObjectIds
Идентификаторы изменяемых событий. Можно получить из RoadEventMapObject.
highlighted
Установка или снятие выделения.
Properties
var visibleEvents
Получение текущих категорий событий, предоставляемых данным источником.
var highlightedObjectsChannel
StatefulChannel<[DgisObjectId]>
Получение списка идентификаторов выделенных дорожных событий.
var highlightedObjects
Получение списка идентификаторов выделенных дорожных событий.
RoadMacroGraph
Пакет глобального дорожного графа, используется для построения проезда между двумя загруженными offline-территориями.
Extends: Package
RoadRuleRouteLongAttribute
Контейнер, который хранит протяженный атрибут маршрута. Каждый элемент хранится в виде пары, состоящей из точки и значения элемента атрибута. Действие атрибута начинается с данной точки и заканчивается в следущей точке, начиная с которой начинается действие атрибута следующего элемента.
Extends: Hashable
public static func == (lhs: RoadRuleRouteLongAttribute, rhs: RoadRuleRouteLongAttribute) -> 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.
public func entry(
point: RoutePoint
) -> RoadRuleRouteLongEntry?
Элемент, в который попадает заданная точка.
Parameters
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [RoadRuleRouteLongEntry]
Элементы, частично или полностью покрываемые отрезком [begin, end].
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
RoadSubtypeRouteLongAttribute
Контейнер, который хранит протяженный атрибут маршрута. Каждый элемент хранится в виде пары, состоящей из точки и значения элемента атрибута. Действие атрибута начинается с данной точки и заканчивается в следущей точке, начиная с которой начинается действие атрибута следующего элемента.
Extends: Hashable
public static func == (lhs: RoadSubtypeRouteLongAttribute, rhs: RoadSubtypeRouteLongAttribute) -> 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.
public func entry(
point: RoutePoint
) -> RoadSubtypeRouteLongEntry?
Элемент, в который попадает заданная точка.
Parameters
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [RoadSubtypeRouteLongEntry]
Элементы, частично или полностью покрываемые отрезком [begin, end].
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
RoadSurfaceRouteLongAttribute
Контейнер, который хранит протяженный атрибут маршрута. Каждый элемент хранится в виде пары, состоящей из точки и значения элемента атрибута. Действие атрибута начинается с данной точки и заканчивается в следущей точке, начиная с которой начинается действие атрибута следующего элемента.
Extends: Hashable
public static func == (lhs: RoadSurfaceRouteLongAttribute, rhs: RoadSurfaceRouteLongAttribute) -> 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.
public func entry(
point: RoutePoint
) -> RoadSurfaceRouteLongEntry?
Элемент, в который попадает заданная точка.
Parameters
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [RoadSurfaceRouteLongEntry]
Элементы, частично или полностью покрываемые отрезком [begin, end].
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
RoadTypeRouteLongAttribute
Контейнер, который хранит протяженный атрибут маршрута. Каждый элемент хранится в виде пары, состоящей из точки и значения элемента атрибута. Действие атрибута начинается с данной точки и заканчивается в следущей точке, начиная с которой начинается действие атрибута следующего элемента.
Extends: Hashable
public static func == (lhs: RoadTypeRouteLongAttribute, rhs: RoadTypeRouteLongAttribute) -> 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.
public func entry(
point: RoutePoint
) -> RoadTypeRouteLongEntry?
Элемент, в который попадает заданная точка.
Parameters
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [RoadTypeRouteLongEntry]
Элементы, частично или полностью покрываемые отрезком [begin, end].
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
RotateMapToNorthEvent
Route
Класс, описывающий маршрут. Маршрут представляет собой набор атрибутов, каждый из которых представляет собой контейнер типа RouteAttribute или RouteLongAttribute, в котором хранятся элементы атрибутов маршрута. Атрибуты маршрута делятся на точечные и протяженные. Точечные атрибуты (например, точки геометрии или лежачие полицейские) задаются в виде пары из RoutePoint и значения атрибута. Протяженные атрибуты (например, ширина проезжей части или ограничение скорости) задаются в виде пары из RoutePoint, которая указывает на начало действия атрибута и значения атрибута. В конце маршрута ставится терминатор. Например, пусть ширина проезжей части задана в виде набора пар {{0m, 3m}, {10m, 7m}, {20m, 5m}, {30m, 0m}}, тогда первые 10 метров маршрута проезжая часть имеет ширину 3 метра, на интервале [10м., 20м.) - 7м., с 20м. до конца маршрута - 5м.
Extends: Hashable
public static func == (lhs: Route, rhs: Route) -> 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 geometry
Геометрия маршрута.<br/>Не гарантируется, что RoutePoint у точек геометрии будет совпадать с RoutePoint у элементов других атрибутов, поэтому для того, чтобы вычислить географическую координату у элемента атрибута, не нужно искать в геометрии элемент, RoutePoint которого совпадает с RoutePoint элемента атрибута, вместо этого нужно воспользоваться функцией calculate_geo_point.
var instructions
Инструкции, которые необходимо выполнить для движения по маршруту.
var intermediatePoints
Промежуточные точки, через которые проходит маршрут. Маршрут может проходить не прямо через промежуточную точку, а рядом с ней. В значении атрибута хранится координата, в которую была установлена промежуточная точка, в ключе - координата проекции промежуточной точки на маршрут.
var altitudes
Высоты на маршруте.
var badRoads
Плохая дорога (на дороге присутствуют кочки и ямы, которые препятствуют проезду).
var obstacles
Препятствия на маршруте.
var roadNames
Названия дорог/улиц.
var settlements
Признак того, что участок маршрута проходит по населённому пункту.
var transportTypes
Вид транспорта, для которого построен участок маршрута.
var cameras
Дорожные камеры.
var carriagewaysWidth
Ширина проезжей части в метрах. 0 - ширина неизвестна.
var exitSigns
Знаки съездов.
var humps
Искусственные неровности.
var lanes
Полосы движения.
var levels
Этажи зданий.
var maxSpeedLimits
Ограничения максимальной допустимой скорости.<br/>0 - ограничение скорости неизвестно.
var roadRules
Сторона движения.
var roadSubtypes
Дополнительное описание типа дороги, по которой пролегает маршрут.
var roadSurfaces
Покрытие дороги.
var roadTypes
Тип дороги, по которой пролегает маршрут.
var tolls
Участки маршрута, пролегающие по платным дорогам.
var truckData
Признак наличия или отсутствия данных для грузовой навигации.
var truckPassZoneIds
Пропускные зоны для грузового транспорта.
var truckRestrictedAreas
Признак действия знака запрета проезда грузового транспорта.
var vehicleRestrictedAreas
Признак действия знака запрета проезда любого автотранспорта (перекрытия).
var bicycleLanes
Признак наличия выделенной велополосы.
var trafficLights
Признак наличия светофоров.
var immersiveData
var publicTransportTransfers
Описание способов перемещения на общественном транспорте между точками пересадок.
RouteEditor
Интерфейс для редактора маршрута. Редактор маршрута получает точки начала и конца маршрута, строит маршруты и через каналы оповещает об их обновлениях и перестроениях.<br/>Все методы этого интерфейса вызываются из одного потока.
Extends: Hashable
public static func == (lhs: RouteEditor, rhs: RouteEditor) -> Bool
Returns a Boolean value indicating whether two values are equal.<br/>This documentation comment was inherited from .
public convenience init(
context: Context,
trafficRouter: TrafficRouter? = nil
)
Функция создания редактора маршрута.
Parameters
context
Контекст.
trafficRouter
Поисковик маршрута для использования внутри редактора маршрута. Если не задан, по умолчанию используется гибридный поисковик.
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.
public func setRouteParams(
routeParams: RouteEditorRouteParams
)
Установка параметров редактора маршрута. Запускает поиск нового маршрута согласно переданным параметрам.
Parameters
routeParams
public func setActiveRouteIndex(
index: RouteIndex
)
Установка индекса активного маршрута.
Parameters
index
Properties
var routesInfoChannel
StatefulChannel<RouteEditorRoutesInfo>
Канал, через который можно следить за обновлениями информации о маршрутах, которыми оперирует редактор.
var routesInfo
Канал, через который можно следить за обновлениями информации о маршрутах, которыми оперирует редактор.
var activeRouteIndexChannel
StatefulChannel<RouteIndex?>
Канал, через который можно следить за обновлениями индекса активного маршрута. В случае отсутствия маршрутов в этот канал помещается nil.
var activeRouteIndex
Канал, через который можно следить за обновлениями индекса активного маршрута. В случае отсутствия маршрутов в этот канал помещается nil.
RouteEditorSource
Интерфейс класса, управляющего отображением маршрутов на карте.
Extends: Source
public convenience init(
context: Context,
routeEditor: RouteEditor,
activeDisplayFlags: RouteMapObjectDisplayFlagOptionSet? = nil,
inactiveDisplayFlags: RouteMapObjectDisplayFlagOptionSet? = nil,
activeCalloutLabelFlags: RouteMapObjectCalloutLabelFlagOptionSet? = nil,
inactiveCalloutLabelFlags: RouteMapObjectCalloutLabelFlagOptionSet? = nil,
calloutLabelDisplayMode: RouteMapObjectCalloutLabelDisplayMode = RouteMapObjectCalloutLabelDisplayMode.absoluteValues,
activePermanentDisplayFlags: RouteMapObjectPermanentDisplayFlagOptionSet? = nil,
inactivePermanentDisplayFlags: RouteMapObjectPermanentDisplayFlagOptionSet? = nil
)
Функция создания IRouteEditorSource.
Parameters
context
routeEditor
activeDisplayFlags
inactiveDisplayFlags
activeCalloutLabelFlags
inactiveCalloutLabelFlags
calloutLabelDisplayMode
activePermanentDisplayFlags
inactivePermanentDisplayFlags
Methods
public func setRoutesVisible(
visible: Bool
)
Включить или выключить отображение маршрутов на карте.
Parameters
visible
public func setShowOnlyActiveRoute(
showOnlyActiveRoute: Bool
)
Отображать на карте все маршруты (false) или только текущий активный маршрут (true).
Parameters
showOnlyActiveRoute
public func setPassedDistanceVisualization(
passedDistanceVisualization: RouteMapObjectPassedDistanceVisualization
)
Изменить способ визуализации расстояния, пройденного вдоль маршрута.
Parameters
passedDistanceVisualization
Properties
var objects
Объекты маршрута на карте.
var routeSourceSettings
Настройки отображения маневров на маршруте.
var activeDisplayFlags
Флаги отображения активного маршрута. См. IRouteMapObject::display_flags.
var inactiveDisplayFlags
Флаги отображения неактивных маршрутов. См. IRouteMapObject::display_flags.
var activeCalloutLabelFlags
Флаги, включающие отображение содержимого в баблах активного маршрута. См. IRouteMapObject::callout_label_flags.
var inactiveCalloutLabelFlags
Флаги, включающие отображение содержимого в баблах неактивных маршрутов. См. IRouteMapObject::callout_label_flags.
var calloutLabelDisplayMode
Режим отображения значений в баблах маршрутов. См. IRouteMapObject::callout_label_display_mode.
var activePermanentDisplayFlags
Флаги, исключающие скрытие компонентов активного маршрута с карты. См. IRouteMapObject::permanent_display_flags.
var inactivePermanentDisplayFlags
Флаги, исключающие скрытие компонентов неактивных маршрутов с карты. См. IRouteMapObject::permanent_display_flags.
RouteExitSignRouteAttribute
Контейнер, который описывает точечный атрибут маршрута. Каждый элемент хранится в виде точки на маршруте, в которой этот элемент расположен и значения самого элемента.
Extends: Hashable
public static func == (lhs: RouteExitSignRouteAttribute, rhs: RouteExitSignRouteAttribute) -> 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.
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [RouteExitSignRouteEntry]
Элементы, попадающие в отрезок [begin, end).
Parameters
public func findNearBackward(
point: RoutePoint
) -> RouteExitSignRouteEntry?
Найти ближайший элемент, позиция которого < = point.<br/>Сложность операции log2(N), где N = size.
Parameters
public func findNearForward(
point: RoutePoint
) -> RouteExitSignRouteEntry?
Найти ближайший элемент, позиция которого >= point.<br/>Сложность операции log2(N), где N = size.
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
RouteInfoCalloutMapObject
Объект бабла с информацией о длине и/или длительности маршрута на карте.
Extends: MapObject
Properties
var route
Маршрут, часть которого представляет данный объект бабла.
var routeIndex
Индекс маршрута.
var routePoint
Позиция на маршруте, на которой расположен бабл.
RouteLevelInfoRouteLongAttribute
Контейнер, который хранит протяженный атрибут маршрута. Каждый элемент хранится в виде пары, состоящей из точки и значения элемента атрибута. Действие атрибута начинается с данной точки и заканчивается в следущей точке, начиная с которой начинается действие атрибута следующего элемента.
Extends: Hashable
public static func == (lhs: RouteLevelInfoRouteLongAttribute, rhs: RouteLevelInfoRouteLongAttribute) -> 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.
public func entry(
point: RoutePoint
) -> RouteLevelInfoRouteLongEntry?
Элемент, в который попадает заданная точка.
Parameters
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [RouteLevelInfoRouteLongEntry]
Элементы, частично или полностью покрываемые отрезком [begin, end].
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
RouteMapObject
Объект маршрута на карте.
Extends: MapObject
public convenience init(
trafficRoute: TrafficRoute,
isActive: Bool,
index: RouteIndex,
displayFlags: RouteMapObjectDisplayFlagOptionSet? = nil,
calloutLabelFlags: RouteMapObjectCalloutLabelFlagOptionSet? = nil,
calloutLabelDisplayMode: RouteMapObjectCalloutLabelDisplayMode = RouteMapObjectCalloutLabelDisplayMode.absoluteValues,
permanentDisplayFlags: RouteMapObjectPermanentDisplayFlagOptionSet? = nil
)
Parameters
trafficRoute
isActive
index
displayFlags
calloutLabelFlags
calloutLabelDisplayMode
permanentDisplayFlags
Properties
var displayFlagsChannel
StatefulChannel<RouteMapObjectDisplayFlagOptionSet?>
Набор флагов для отображения различных частей маршрута. Если не задан, используется логика отображения на основе статуса активности маршрута.
var displayFlags
Набор флагов для отображения различных частей маршрута. Если не задан, используется логика отображения на основе статуса активности маршрута.
var permanentDisplayFlagsChannel
StatefulChannel<RouteMapObjectPermanentDisplayFlagOptionSet?>
Набор флагов для предотвращения скрытия различных составных частей маршрута с карты при обновлении пройденного вдоль маршрута расстояния. Если не задан, то при обновлении пройденного вдоль маршрута расстояния с карты скрываются все элементы маршрута, попадающие в неотображаемую часть маршрута.
var permanentDisplayFlags
Набор флагов для предотвращения скрытия различных составных частей маршрута с карты при обновлении пройденного вдоль маршрута расстояния. Если не задан, то при обновлении пройденного вдоль маршрута расстояния с карты скрываются все элементы маршрута, попадающие в неотображаемую часть маршрута.
var isActiveChannel
StatefulChannel<Bool>
Статус активности маршрута.
var isActive
Статус активности маршрута.
var route
Маршрут.
var routeIndex
Индекс маршрута в редакторе маршрута.
var passedDistanceChannel
StatefulChannel<RouteDistance>
Пройденное расстояние вдоль маршрута.
var passedDistance
Пройденное расстояние вдоль маршрута.
var passedDistanceVisualizationChannel
StatefulChannel<RouteMapObjectPassedDistanceVisualization>
var passedDistanceVisualization
var calloutPositionChannel
StatefulChannel<[CalloutMapPosition]>
Положение бабла маршрута.
var calloutPosition
Положение бабла маршрута.
var calloutLabelFlagsChannel
StatefulChannel<RouteMapObjectCalloutLabelFlagOptionSet?>
Набор флагов для отображения содержимого баблов маршрута. Если не задан, то для активного маршрута отображается и время движения по маршруту, и его длина, а для неактивных маршрутов - только время движения.
var calloutLabelFlags
Набор флагов для отображения содержимого баблов маршрута. Если не задан, то для активного маршрута отображается и время движения по маршруту, и его длина, а для неактивных маршрутов - только время движения.
var calloutLabelDisplayModeChannel
StatefulChannel<RouteMapObjectCalloutLabelDisplayMode>
Режим отображения значений в баблах маршрута. По умолчанию значения отображаются в виде абсолютных величин.
var calloutLabelDisplayMode
Режим отображения значений в баблах маршрута. По умолчанию значения отображаются в виде абсолютных величин.
var lanesCalloutPositionsChannel
StatefulChannel<[LanesCalloutMapPosition]>
Положения баблов полосности. Возвращаются только актуальные положения для текущего пройденного расстояния по маршруту и только если источник, в который помещён объект, работает в режиме навигации.
var lanesCalloutPositions
Положения баблов полосности. Возвращаются только актуальные положения для текущего пройденного расстояния по маршруту и только если источник, в который помещён объект, работает в режиме навигации.
var roadEventObjectsChannel
StatefulChannel<RoadEventMapObjectRouteAttribute>
Отображаемые на карте объекты дорожных событий вдоль маршрута.
var roadEventObjects
Отображаемые на карте объекты дорожных событий вдоль маршрута.
RouteMapObjectSource
Источник объектов маршрута на карте.
Extends: Source
public convenience init(
context: Context,
routeVisualizationType: RouteVisualizationType = RouteVisualizationType.normal
)
Функция создания IRouteMapObjectSource.
Parameters
Methods
public func addObject(
item: RouteMapObject
)
Добавление объекта маршрута в источник.
Parameters
item
public func removeObject(
item: RouteMapObject
)
Удаление объекта маршрута из источника.
Parameters
item
public func replaceObject(
oldObject: RouteMapObject,
newObject: RouteMapObject
)
Замена одного объекта маршрута в источнике на другой. В отличие от удаления и добавления объектов маршрута через последовательные вызовы remove_object и add_object замена одного маршрута на другой выполняется атомарно - старый маршрут удаляется, а новый появляется на карте одновременно.<br/>Если старый маршрут не найден в источнике, то вызов эквивалентен вызову add_object.
Parameters
public func clear()
Удаление всех объектов маршрута из источника.
public func replaceAllObjects(
objects: [RouteMapObject]
)
Замена всех ранее добавленных в источник объектов на передаваемый список объектов. В отличие от удаления и добавления объектов по одному замена выполняется атомарно - старые маршруты удал яются, а новые маршруты появляются на карте одновременно.
Parameters
objects
Properties
var objects
Объекты маршрута.
var routeSourceSettings
Настройка отображения объектов в источнике.
RouteMapObjectsProvider
Интерфейс для получения объектов маршрута на карте.
Extends: Hashable
public static func == (lhs: RouteMapObjectsProvider, rhs: RouteMapObjectsProvider) -> 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 objectsChannel
StatefulChannel<[RouteMapObject]>
Объекты маршрута на карте.
var objects
Объекты маршрута на карте.
RouteMapSettings
Настройки отображения маршрута на карте.
Extends: Hashable
public static func == (lhs: RouteMapSettings, rhs: RouteMapSettings) -> 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 onRouteDisplayFlags
Флаги отображения маршрута на карте для режима ведения по маршруту. По умолчанию включены все флаги, за исключением флага InactiveFloors.
var freeRoamDisplayFlags
Флаги отображения маршрута на карте для режима free roam. По умолчанию включены флаги Cameras, Humps, Accidents, RoadWorks, Comments, RoadRestrictions, OtherEvents.
var onRoutePermanentDisplayFlags
Флаги, исключа ющие скрытие различных составных частей маршрута с карты при обновлении пройденного вдоль маршрута расстояния для режима ведения по маршруту. По умолчанию скрываются все элементы маршрута.
var freeRoamPermanentDisplayFlags
Флаги, исключающие скрытие различных составных частей маршрута с карты при обновлении пройденного вдоль маршрута расстояния для режима free roam. По умолчанию скрываются все элементы маршрута.
RoutePointMapObject
Точечный объект, являющийся частью маршрута на карте (например, точка начала или конца маршрута).
Extends: MapObject
Properties
var route
Маршрут, часть которого представляет данный точечный объект.
var routeIndex
Индекс маршрута.
var kind
Тип точечного объекта маршрута.
var routePoint
Позиция на маршруте, соответствующая данному точечному объекту.
var pointChannel
StatefulChannel<GeoPoint>
Географические координаты, в которых находится данный точечный объект.
var point
Географические координаты, в которых находится данный точечный объект.
RouteRebuilder
Контроллер поиска нового маршрута при сходе с текущего маршрута.
Extends: Hashable
public static func == (lhs: RouteRebuilder, rhs: RouteRebuilder) -> 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 enabled
RouteSourceSettings
Настройки источника маршрута.
Extends: Hashable
public static func == (lhs: RouteSourceSettings, rhs: RouteSourceSettings) -> 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.
public func getLargeScaleMergeDistanceMeters(
transportType: TransportType
) -> Float
Минимально допустимое расстояние в метрах между последовательными стрелками манёвров для крупного масштаба. Если расстояние меньше заданного, то стрелки объединяются.
Parameters
public func setLargeScaleMergeDistanceMeters(
distance: Float,
transportType: TransportType
)
Установить минимально допустимое расстояние в метрах между последовательными стрелками манёвров для крупного масштаба.
Parameters
distance
Float
Расстояние в метрах.
transportType
Тип транспорта, для которого устанавливается расстояние.
public func getSmallScaleMergeDistanceMeters(
transportType: TransportType
) -> Float
Минимально допустимое расстояние в метрах между последовательными стрелками манёвров для мелкого масштаба. Если расстояние меньше заданного, то стрелки объединяются.
Parameters
public func setSmallScaleMergeDistanceMeters(
distance: Float,
transportType: TransportType
)
Установить минимально допустимое расстояние в метрах между последовательными стрелками манёвров для мелкого масштаба.
Parameters
distance
Float
Расстояние в метрах.
transportType
Тип транспорта, для которого устанавливается расстояние.
public func getLargeScaleCrossroadsOffsetMeters(
transportType: TransportType
) -> Float
Смещение в метрах от точки перекрестка до начала и конца стрелки манёвра для крупного масштаба.
Parameters
public func setLargeScaleCrossroadsOffsetMeters(
offset: Float,
transportType: TransportType
)
Установить смещение в метрах от точки перекрестка до начала и конца стрелки маневра для крупного масштаба. Позволяет задать размер стрелки маневра.
Parameters
offset
Float
Смещение в метрах.
transportType
Тип транспорта, для которого устанавливается смещение.
public func getSmallScaleCrossroadsOffsetMeters(
transportType: TransportType
) -> Float
Смещение от точки перекрестка до начала и конца стрелки манёвра для мелкого масштаба.
Parameters
public func setSmallScaleCrossroadsOffsetMeters(
offset: Float,
transportType: TransportType
)
Установить смещение от точки перекрестка до начала и конца стрелки маневра для мелкого масштаба. Позволяет задать размер стрелки маневра.
Parameters
offset
Float
Смещение в метрах.
transportType
Тип транспорта, для которого устанавливается смещение.
Properties
var largeScaleRingroadOffsetMeters
Float
Смещение от точки съезда с кольца до начала и конца стрелки маневра для крупного масштаба. Позволяет задать размер стрелки ман евра.
var smallScaleRingroadOffsetMeters
Float
Смещение от точки съезда с кольца до начала и конца стрелки маневра для мелкого масштаба. Позволяет задать размер стрелки маневра.
var calloutVisualizationMode
Режим отображения баблов со временем и длиной маршрута.
ScaleMapEvent
Событие изменения масштаба карты.
Extends: Event
public convenience init(
zoomDelta: Float,
scalingCenter: ScreenPoint? = nil
)
Конструктор события изменения масштаба.
Parameters
zoomDelta
Float
Величина, на которую изменится текущее значение масштаба.
scalingCenter
Точка на экране, относительно которой масштабируется карта. Если точка не задана, то масштабирование происходит относительно точки позиции карты.
Properties
var zoomDelta
Float
Величина, на которую изменится текущее значение масштаба.
var scalingCenter
Точка на экране, относительно которой масштабируется карта.
SearchHistory
Extends: Hashable
public static func == (lhs: SearchHistory, rhs: SearchHistory) -> 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.
public func items(
page: SearchHistoryPage
) -> Future<SearchHistoryResult>
Возвращает страницу истории поиска. Элементы возвращаются в упорядоченном виде по времени добавления (от самых свежих до самых поздних).
Parameters
public func addItem(
item: SearchHistoryItem
)
Добавляет элемент в историю поиска. В случае, если уже существовал такой же элемент, ранний дубликат удаляется.
Parameters
public func addItems(
items: [SearchHistoryItem]
)
Добавляет список элементов в историю поиска. Считается, что порядок в списке хронологический. Все дубликаты будут убраны.
Parameters
items
public func removeItem(
item: SearchHistoryItem
)
Удаляет элемент из истории поиска.
Parameters
public func removeItems(
items: [SearchHistoryItem]
)
Удаляет список элементов из истории поиска.
Parameters
items
public func clear()
Очищает историю поиска.
Properties
var capacity
Получает максимальный размер истории поиска.
var onHistoryChanged
Channel<ChangeType>
SearchHistoryResult
Результат работы истории поиска при запросе истории.
Extends: Hashable
public static func == (lhs: SearchHistoryResult, rhs: SearchHistoryResult) -> 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 items
Набор элементов истории поиска.
SearchManager
Поисковик. Основная точка входа для справочного API.
Extends: Hashable
Implements: ISearchManager
public static func == (lhs: SearchManager, rhs: SearchManager) -> 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.
public static func createOnlineManager(
context: Context
) throws -> SearchManager
Создать поисковик, работающий онлайн.
Parameters
public static func createOfflineManager(
context: Context
) throws -> SearchManager
Создать поисковик, работающий с предзагруженными данными.
Parameters
public static func createSmartManager(
context: Context
) throws -> SearchManager
Создать поисковик, работающий онлайн или с предзагруженными данными в зависимости от наличия подключения к сети интернет.
Parameters
public func suggest(
query: SuggestQuery
) -> Future<SuggestResult>
Получить подсказки, соответствующие данному запросу.
Parameters
query
public func search(
query: SearchQuery
) -> Future<SearchResult>
Получить объекты справочника, соответствующие данному запросу.
Parameters
query
public func searchById(
id: String
) -> Future<DirectoryObject?>
Получить объект справочника по строковому идентификатору.
Parameters
id
public func searchByDirectoryObjectId(
objectId: DgisObjectId
) -> Future<DirectoryObject?>
Получить объект справочника по идентификатору.
Parameters
objectId
public func searchByIdWithLocale(
id: String,
locale: Locale?
) -> Future<DirectoryObject?>
Получить объект справочника по строковому идентификатору с указанной локалью.
Parameters
public func searchByDirectoryObjectIdWithLocale(
objectId: DgisObjectId,
locale: Locale?
) -> Future<DirectoryObject?>
Получить объект справочника по идентификатору с указанной локалью.
Parameters
SearchQuery
Поисковый запрос.
Extends: Hashable
public static func == (lhs: SearchQuery, rhs: SearchQuery) -> 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.
SearchQueryBuilder
Построитель поисковых запросов. Поиск осуществляется по глобальному индексу, а также по локальным индексам сегментов, где сегмент - это некоторый кусок разбиения глобальной карты. Процедура выбора сегментов для поиска осуществляется следующими способами (по убыванию приоритета):
Extends: Hashable
public static func == (lhs: SearchQueryBuilder, rhs: SearchQueryBuilder) -> 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.
public static func fromQueryText(
queryText: String
) -> SearchQueryBuilder
Начать построение текстового поискового запроса c указанным текстом.
Parameters
public static func fromRubricIds(
rubricIds: [RubricId]
) -> SearchQueryBuilder
Начать построение по искового запроса на основе идентификаторов рубрик.
Parameters
public static func fromQueryTextAndRubricIds(
queryText: String,
rubricIds: [RubricId]
) -> SearchQueryBuilder
Начать построение текстового поискового запроса с фильтрацией по идентификаторам рубрик.
Parameters
public static func fromQuery(
query: SearchQuery
) -> SearchQueryBuilder
Начать построение запроса на основе запроса #query для изменения части параметров.<br/>Исходный запрос #query остается без изменений
Parameters
public static func fromOrgId(
orgId: OrgId
) -> SearchQueryBuilder
Начать построение поискового запроса c указанным идентификатором организации.
Parameters
public static func fromBuildingId(
buildingId: BuildingId
) -> SearchQueryBuilder
Начать построение поискового запроса c указанным идентификатором здания.
Parameters
public static func fromGeoPoint(
geoPoint: GeoPoint
) -> SearchQueryBuilder
Начать построение поискового запроса c указанным центром области поиска. Радиус по умолчанию равен 250. Конфликтует с методом set_spatial_restriction. Работает только с онлайн поиском.
Parameters
public func setSpatialRestriction(
spatialRestriction: [GeoPoint]?
) -> SearchQueryBuilder
Задать ограничение области поиска в форме полигона. Первая и последняя точки полигона не обязаны совпадать. Конфликтует с методоми set_geo_point и from_geo_point.<br/>по умолчанию ограничение отсутствует.
Parameters
public func setAreaOfInterest(
rect: GeoRect?
) -> SearchQueryBuilder
Задать прямоугольную область интереса в географических координатах. Типичным значением является visible_rect из ICamera - объемлющий прямоугольник области просмотра.
Parameters
public func setAllowedResultTypes(
allowedResultTypes: [ObjectType]
) -> SearchQueryBuilder
За дать типы объектов, разрешенные в результате запроса.<br/>по умолчанию все, кроме Route
Parameters
public func setPageSize(
pageSize: Int32
) -> SearchQueryBuilder
Задать предпочитаемое количество элементов на странице результатов. Допустимы значения из диапазона [1; 50]<br/>по умолчанию 10
Parameters
public func setDirectoryFilter(
filter: DirectoryFilter
) -> SearchQueryBuilder
Задать фильтрацию для поискового запроса.
Parameters
public func setSortingType(
sortingType: SortingType
) -> SearchQueryBuilder
Задать сортировку для поискового запроса.
Parameters
public func setGeoPoint(
geoPoint: GeoPoint
) -> SearchQueryBuilder
Задать центр для поискового запроса. Радиус по умолчанию равен 250 метров. Конфликтует с методом set_spatial_restriction.
Parameters
public func setRadius(
radius: Meter
) -> SearchQueryBuilder
Задать радиус поиска в метрах. Работает в сочетании с установленным geo_point. Для поискового запроса в точке ограничение от 0 до 2000. Для остальных запросов ограничение от 0 до 50000.
Parameters
public func setLocale(
locale: Locale?
) -> SearchQueryBuilder
Задать локаль для поискового запроса.
Parameters
public func setSearchNearby(
searchNearby: Bool
) -> SearchQueryBuilder
Указание поисковому движку использовать режима поиска рядом с пользователем. Сильно повышает значимость расстояния от пользователя.
Parameters
SearchQueryWithInfo
Класс с дополнительной информацией о поисковом запросе для вывода в UI-элементах.
Extends: Hashable
public static func == (lhs: SearchQueryWithInfo, rhs: SearchQueryWithInfo) -> Bool
Returns a Boolean value indicating whether two values are equal.<br/>This documentation comment was inherited from .
public convenience init(
searchQuery: SearchQuery,
title: String,
subtitle: String
)
Parameters
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 searchQuery
Возвращает объект поискового запроса.
var title
Возвращает текст заголовка, который описывает объекты поискового запроса. Например, это может быть текст из поля title объекта ISuggest.
var subtitle
Возвращает текст подзаголовка. Например, это может быть текст из поля subtitle объекта ISuggest.
var rubrics
Возвращает список рубрик, по которым производится запрос.
SearchResult
Результат работы поисковика.
Extends: Hashable
public static func == (lhs: SearchResult, rhs: SearchResult) -> 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.
public func markerTitles(
objectIds: [DgisObjectId]
) -> [Future<[UIMarkerInfo]>]
Получение текстов маркеров по их идентификаторам. Возвращается vector <future
Parameters
Properties
var firstPage
Первая страница результатов поиска.
var representativeArea
Прямоугольная область, подходящая для отображения результатов поиска.
var itemMarkerInfos
Future<[ItemMarkerInfo]?>
Асинхронное получение маркеров.
var searchResultType
Тип поискового запроса.
var dynamicFilters
Динамические фильтры для этого запроса.
var actionWidgets
Виджеты быстрых фильтров.<br/>Это так называемые “быстрые фильтры” - фильтры, наиболее интересные пользователю. Их не больше 5.
var mainWidgets
Виджеты фильтров.
var autoUseFirstResult
Признак того, что первый результат пригоден для непосредственного использования.
var nearbyRequested
Признак того, что запрошены объекты поблизости.
SearchResultItemViewFactory
Extends: ISearchResultItemViewFactory
public init(
viewModel: SearchResultItemViewModel,
theme: DirectoryViewTheme.SearchResultItemViewTheme
)
Parameters
viewModel
Methods
public func makeTitleView() -> AnyView
Returns
AnyView
public func makeSubtitleView() -> AnyView
Returns
AnyView
public func makeRatingView() -> AnyView
Returns
AnyView
public func makeDistanceView() -> AnyView
Returns
AnyView
public func makeAddressView() -> AnyView
Returns
AnyView
public func makeAttributesView() -> AnyView
Returns
AnyView
public func makeChargingStationView() -> AnyView
Returns
AnyView
public func makeAlertView() -> AnyView
Returns
AnyView
SettlementRouteLongAttribute
Контейнер, который хранит протяженный атрибут маршрута. Каждый элемент хранится в виде пары, состоящей из точки и значения элемента атрибута. Действие атрибута начинается с данной точки и заканчивается в следущей точке, начиная с которой начинается действие атрибута следующего элемента.
Extends: Hashable
public static func == (lhs: SettlementRouteLongAttribute, rhs: SettlementRouteLongAttribute) -> 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.
public func entry(
point: RoutePoint
) -> SettlementRouteLongEntry?
Элемент, в который попадает заданная точка.
Parameters
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [SettlementRouteLongEntry]
Элементы, частично или полностью покрываемые отрезком [begin, end].
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
SimpleCheckableItem
Простой отмечаемый элемент из CheckableItemsGroup.
Extends: CheckableItem
SimpleClusterObject
Кластер простых (simple) объектов-маркеров.
Extends: MapObject
Methods
Properties
var position
Получение позиции кластера на карте.
var objectCount
Получение количества маркеров в кластере.
var objects
Получение списка маркеров в кластере.
var anchor
Получение и установка точки привязки иконки кластера.
var iconOpacity
Получение и установка прозрачности иконки кластера.
var text
Получение и установка подписи кластера.
var textStyle
Получение и установка стиля подписи кластера.
var iconWidth
Получение и установка целевой ширины кластера, используемой для масштабирования.
var iconMapDirection
Получение и установка угла поворота кластера на карте относительно направления на север, по часовой стрелке.
var animatedAppearance
Получение и установка флага анимируемости появления кластера.
var zIndex
Получение и установка уровня отрисовки объекта.
SimpleMapObject
Объект на карте, для которого можно задавать видимость.
Extends: MapObject
SimulationSettings
Настройки симуляции ведения по маршруту.
Extends: Hashable
public static func == (lhs: SimulationSettings, rhs: SimulationSettings) -> 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 speedMode
Режим работы симулятора.
SoundNotificationSettings
Настройки звуковых оповещений в навигаторе По умолчанию все значения категорий звуков оповещений включены. Пользователь может менять значения во время работы с навигатором.
Extends: Hashable
public static func == (lhs: SoundNotificationSettings, rhs: SoundNotificationSettings) -> 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 enabledSoundCategories
Набор флагов для звуковых оповещений.
Source
Источник данных на карте.
Extends: Hashable
public static func == (lhs: Source, rhs: Source) -> 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.
StatefulChannel
Extends: Channel<Value>
Properties
var value
Value
StringRouteLongAttribute
Контейнер, который хранит протяженный атрибут маршрута. Каждый элемент хранится в виде пары, состоящей из точки и значения элемента атрибута. Действие атрибута начинается с данной точки и заканчивается в следущей точке, начиная с которой начинается действие атрибута следующего элемента.
Extends: Hashable
public static func == (lhs: StringRouteLongAttribute, rhs: StringRouteLongAttribute) -> 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.
public func entry(
point: RoutePoint
) -> StringRouteLongEntry?
Элемент, в который попадает заданная точка.
Parameters
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [StringRouteLongEntry]
Элементы, частично или полностью покрываемые отрезком [begin, end].
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
Style
Стиль с набором свойств объектов карты (cм. ISource).
Extends: Hashable
public static func == (lhs: Style, rhs: Style) -> 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 styleAttributes
Получение свойств по умолчанию для объектов, к которым п рименён указанный слой.
StyleZoomFollowController
Контроллер слежения за стилевым уровнем масштабирования карты.
Extends: FollowController
public convenience init(
animationDuration: TimeInterval = 0.3
)
Создание контроллера слежения за стилевым уровнем масштабирования карты.
Parameters
animationDuration
TimeInterval
Methods
public func setStyleZoom(
styleZoom: StyleZoom
)
Установка нового значения стилевого уровня масштабирования.
Parameters
styleZoom
Suggest
Поисковая подсказка.
Extends: Hashable
public static func == (lhs: Suggest, rhs: Suggest) -> 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 handler
Обработчик выбора подсказки.
var suggestedType
Тип подсказки.
var title
Заголовок подсказки.
var subtitle
Подзаголовок подсказки.
SuggestObjectHandler
Предложен конкретный объект справочника.
Extends: Hashable
public static func == (lhs: SuggestObjectHandler, rhs: SuggestObjectHandler) -> 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 item
Подсказанный объект.
SuggestQuery
Запрос поисковой подсказки.
Extends: Hashable
public static func == (lhs: SuggestQuery, rhs: SuggestQuery) -> 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.
SuggestQueryBuilder
Построитель запросов к подсказчику.
Extends: Hashable
public static func == (lhs: SuggestQueryBuilder, rhs: SuggestQueryBuilder) -> 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.
public static func fromQueryText(
queryText: String
) -> SuggestQueryBuilder
Начать построение запроса подсказки для заданного текста и области интереса.
Parameters
public static func fromQuery(
query: SuggestQuery
) -> SuggestQueryBuilder
Начать построение запроса подсказки на основе запроса #query для изменения части параметров.<br/>Исходный запрос #query остае тся без изменений
Parameters
public func setSpatialRestriction(
spatialRestriction: [GeoPoint]?
) -> SuggestQueryBuilder
Задать ограничение области поиска в форме полигона. Первая и последняя точки полигона не обязаны совпадать.<br/>по умолчанию ограничение отсутствует
Parameters
public func setAreaOfInterest(
rect: GeoRect?
) -> SuggestQueryBuilder
Задать прямоугольную область интереса в географических координатах. Типичным значением является visible_rect из ICamera - объемлющий прямоугольник области просмотра.
Parameters
public func setAllowedResultTypes(
allowedResultTypes: [SuggestedType]
) -> SuggestQueryBuilder
Задать типы объектов, разрешенные в результате запроса.<br/>по умолчанию все, кроме Route
Parameters
public func setSuggestorType(
suggestorType: SuggestorType
) -> SuggestQueryBuilder
Задать тип подсказчика.<br/>по умолчанию #SuggestorType::Object
Parameters
public func setLimit(
limit: Int32
) -> SuggestQueryBuilder
Задать желаемое количество подсказок. Допустимы значения из диапазона [1; 50]<br/>по умолчанию 10
Parameters
public func setLocale(
locale: Locale?
) -> SuggestQueryBuilder
Локаль, с которой производится запрос подсказки и отдаются результаты.
Parameters
public func setSearchNearby(
searchNearby: Bool
) -> SuggestQueryBuilder
Указание поисковому движку использовать режим поиска рядом с пользователем. Сильно повышает значимость расстояния от пользователя.
Parameters
SuggestResult
Результат работы подсказчика.
Extends: Hashable
public static func == (lhs: SuggestResult, rhs: SuggestResult) -> 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 suggests
Набор предложенных вариантов подсказок.<br/>набор пуст, если подходящие подсказки не найдены
SystemMemoryManager
Интерфейс управления использованием системной памяти.
Extends: Hashable
public static func == (lhs: SystemMemoryManager, rhs: SystemMemoryManager) -> 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.
public func reduceMemoryUsage()
Уменьшение использования памяти путём очистки всевозможных кешей и буферов.
TerritoriesAlongRouteProvider
Интерфейс для поиска маршрута с учетом пробочных данных.
Extends: Hashable
public static func == (lhs: TerritoriesAlongRouteProvider, rhs: TerritoriesAlongRouteProvider) -> 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.
public func getTerritories(
route: Route
) -> Future<[Territory]>
Возвращает минимально необходимый список офлайн-территорий в порядке следования маршрута.
Parameters
route
Territory
Территория. Данные в 2ГИС нарезаны на некоторые неделимые единицы, называемые сегментами. Но для более удобной и гибкой работы с данными для обновления используются не сами сегменты, а их наборы, называемые территориями. Наборы сегментов в двух территориях могут пересекаться, в том числе одна территория может быть целиком вложена в другую.
Extends: Package
TerritoryManager
Интерфейс для взаимодействия со списком территорий: Подписки на изменения информации о территориях; Поиска территорий по координатам и геометриям; Подписки на изменения информации о всеобщем прогрессе установки/обновления территорий; Приостановки и возобновления процесса установки/обновления территорий.
Extends: Hashable
public static func == (lhs: TerritoryManager, rhs: TerritoryManager) -> 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.
public func findByPoint(
geoPoint: GeoPoint
) -> [Territory]
Поиск территорий, которым принадлежит заданная точка. Бросает исключение в случае передачи некорректных координат точки. Возвращает пустой список в случае ошибки, а именно:
Parameters
public func findByRect(
rect: GeoRect
) -> [Territory]
Поиск территорий, которым принадлежит заданная геометрия. Бросает исключение в случае попытки использования неподдерживаемой геометрии. Возвращает пустой список, если геометрия находится за пределами проекции. Возвращает пустой список в случае внутренней ошибки при обработке списка территорий.
Parameters
public func pause()
Приостановка всех запущенных операций установки либо обновления территорий.
public func resume()
Возобновление всех приостановленных операций установки либо обновления территорий.
Properties
var territoriesChannel
StatefulChannel<[Territory]>
Канал со списком всех известных территорий. Обновляется при изменении информации о хотя бы одной из территорий, либо при изменении состава списка. Содержимое канала является подмножеством общего списка пакетов, получаемого из IPackageManager::packages. Во избежание рассинхронизации описаний пакетов, не следует использовать данные, получаемые одновременно из нескольких каналов, содержащих подмножества общего списка пакетов.
var territories
Канал со списком всех известных территорий. Обновляется при изменении информации о хотя бы одной из территорий, либо при изменении состава списка. Содержимое канала является подмножеством общего списка пакетов, получаемого из IPackageManager::packages. Во избежание рассинхронизации описаний пакетов, не следует использовать данные, получаемые одновременно из нескольких каналов, содержащих подмножества общего списка пакетов.
TiltFollowController
Контроллер слежения за углом наклона карты.
Extends: FollowController
public convenience init(
styleZoomToTilt: StyleZoomToTiltRelation
)
Создание контроллера слежения за углом наклона карты.
Parameters
styleZoomToTilt
зависимость угла наклона камеры от стилевого уровня масштабирования.
Traffic
Описание пробочных данных.
Extends: Hashable
public static func == (lhs: Traffic, rhs: Traffic) -> 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 durations
Длительности движения на участках маршрута. 0 - дли тельность движения на участке маршрута неизвестна.
var speedColors
Цветовое представление скоростей движения ТС на маршруте (протяженный атрибут).
TrafficCollector
Интерфейс для управления сервисом сбора информации о транспортном трафике.<br/>Этот интерфейс является потокобезопасным.
Extends: Hashable
public static func == (lhs: TrafficCollector, rhs: TrafficCollector) -> Bool
Returns a Boolean value indicating whether two values are equal.<br/>This documentation comment was inherited from .
public convenience init(
context: Context
)
Функция создания сервиса сбора информации о транспортном трафике. Сервис сбора информации о транспортном трафике анализирует состояние трафика на дороге, по которой движется пользователь и отправляет результаты анализа в анонимизированном виде на сервер.
Parameters
context
Контекст - окружение, необходимое для работы SDK.
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 trafficCollectingAllowed
Функция определения состояния разрешения/запрета отправки информации о дорожном движении на сервер.
TrafficControl
Extends: UIControl
Methods
public override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?)
Parameters
previousTraitCollection
public override func layoutSubviews()
public func switchTrafficVisibility()
Properties
var intrinsicContentSize
TrafficControlModel
Модель контрола пробок.<br/>Этот интерфейс является потокобезопасным.
Extends: Hashable
public static func == (lhs: TrafficControlModel, rhs: TrafficControlModel) -> Bool
Returns a Boolean value indicating whether two values are equal.<br/>This documentation comment was inherited from .
public convenience init(
map: Map
)
Функция создания модели элемента управления пробками.
Parameters
map
карта.
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.
public func onClicked()
Действие при нажатии на контрол. Переключает видимость пробок на карте.
Properties
var stateChannel
StatefulChannel<TrafficControlState>
Состояние элемента управления видимостью пробок.
var state
Состояние элемента управления видимостью пробок.
TrafficRoute
Extends: Hashable
public static func == (lhs: TrafficRoute, rhs: TrafficRoute) -> 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 route
Маршрут.
var traffic
Пробочные данные.
var routeTollPaymentInfos
Информация о стоимости проезда по платным участкам маршрута.
TrafficRouter
Интерфейс для поиска маршрута с учетом пробочных данных.
Extends: Hashable
public static func == (lhs: TrafficRouter, rhs: TrafficRouter) -> Bool
Returns a Boolean value indicating whether two values are equal.<br/>This documentation comment was inherited from .
public convenience init(
context: Context,
routerType: RouterType = RouterType.hybrid
)
Parameters
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.
public func findRoute(
startPoint: RouteSearchPoint,
finishPoint: RouteSearchPoint,
routeSearchOptions: RouteSearchOptions,
intermediatePoints: [RouteSearchPoint] = []
) -> Future<[TrafficRoute]>
Ищет маршрут по зада нным параметрам.
Parameters
startPoint
Начальная точка маршрута.
finishPoint
Конечная точка маршрута.
routeSearchOptions
Параметры поиска маршрута.
intermediatePoints
Промежуточные точки для проезда в том же порядке, в котором точки заданы в векторе.
public func requestRoute(
request: Data,
serverEndpoint: String
) -> Future<[TrafficRoute]>
Ищет маршрут по ранее сериализованным параметрам.
Parameters
request
Data
Сериализованные параметры запроса.
serverEndpoint
Тип искомого маршрута, выступает частью урла, по которому отсылается запрос: bicycle, carrouting, pedestrian, truck.
public func findBriefRouteInfos(
searchPoints: [BriefRouteInfoSearchPoints],
routeSearchOptions: RouteSearchOptions
) -> Future<[BriefRouteInfo?]>
Ищет базовую информацию о маршрутах для соответствующего набора поисковых точек.<br/>Если базовая информация для каких-либо из пар точек не будет найдена, элемент с соответствующим индексом в возвращённом результате будет иметь значение nil.
Parameters
searchPoints
Набор точек для поиска базовой информации о маршруте.
routeSearchOptions
Параметры поиска маршрута.
Returns
BriefRouteInfo<[?]>Future с базовой информацией о наборе маршрутов, соответствующему набору точек поиска, либо исключением SimpleError в случае ошибки.
Properties
var truckPassZonePasses
Future<[TruckPassZonePass]>
Возвращает список всех поддерживаемых пропусков, разрешающих движение грузового транспорта в пределах пропускных зон.
TrafficScoreProvider
Подписка на обновления информации о величине пробок.<br/>Этот интерфейс является потокобезопасным.
Extends: Hashable
public static func == (lhs: TrafficScoreProvider, rhs: TrafficScoreProvider) -> Bool
Returns a Boolean value indicating whether two values are equal.<br/>This documentation comment was inherited from .
public convenience init(
map: Map
)
Функция создания объекта для слежения за баллом пробок в области видимости карты.<br/>Получаемый объект нужно хранить всё время, пока требуется обновление данных.
Parameters
map
Карта, для которой будет отслеживаться область видимости.
public convenience init(
context: Context,
point: GeoPoint
)
Функция создания объекта для слежения за баллом пробок для заданного местоположения.<br/>получаемый объект нужно хранить всё время, пока требуется обновление данных.
Parameters
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 scoreChannel
StatefulChannel<TrafficScore>
Текущее состояние пробок и их балл.
var score
Текущее состояние пробок и их балл.
TrafficSource
TrafficSpeedColorRouteLongAttribute
Контейнер, который хранит протяженный атрибут маршрута. Каждый элемент хранится в виде пары, состоящей из точки и значения элемента атрибута. Действие атрибута начинается с данной точки и заканчивается в следущей точке, начиная с которой начинается действие атрибута следующего элемента.
Extends: Hashable
public static func == (lhs: TrafficSpeedColorRouteLongAttribute, rhs: TrafficSpeedColorRouteLongAttribute) -> 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.
public func entry(
point: RoutePoint
) -> TrafficSpeedColorRouteLongEntry?
Элемент, в который попадает заданная точка.
Parameters
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [TrafficSpeedColorRouteLongEntry]
Элементы, частично или полностью покрываемые отрезком [begin, end].
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
TrafficViewModel
ViewModel для SwiftUI-элемента управления отображением пробок.
Extends: ObservableObject
TransportTypeRouteLongAttribute
Контейнер, который хранит протяженный атрибут маршрута. Каждый элемент хранится в виде пары, состоящей из точки и значения элемента атрибута. Действие атрибута начинается с данной точки и заканчивается в следущей точке, начиная с которой начинается действие атрибута следующего элемента.
Extends: Hashable
public static func == (lhs: TransportTypeRouteLongAttribute, rhs: TransportTypeRouteLongAttribute) -> 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.
public func entry(
point: RoutePoint
) -> TransportTypeRouteLongEntry?
Элемент, в который попадает заданная точка.
Parameters
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [TransportTypeRouteLongEntry]
Элементы, частично или полностью покрываемые отрезком [begin, end].
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
TruckPassZoneIdRouteLongAttribute
Контейнер, который хранит протяженный атрибут маршрута. Каждый элемент хранится в виде пары, состоящей из точки и значения элемента атрибута. Действие атрибута начинается с данной точки и заканчивается в следущей точке, начиная с которой начинается действие атрибута следующего элемента.
Extends: Hashable
public static func == (lhs: TruckPassZoneIdRouteLongAttribute, rhs: TruckPassZoneIdRouteLongAttribute) -> 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.
public func entry(
point: RoutePoint
) -> TruckPassZoneIdRouteLongEntry?
Элемент, в который попадает заданная точка.
Parameters
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [TruckPassZoneIdRouteLongEntry]
Элементы, частично или полностью покрываемые отрезком [begin, end].
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
UIntRouteLongAttribute
Контейнер, который хранит протяженный атрибут маршрута. Каждый элемент хранится в виде пары, состоящей из точки и значения элемента атрибута. Действие атрибута начинается с данной точки и заканчивается в следущей точке, начиная с которой начинается действие атрибута следующего элемента.
Extends: Hashable
public static func == (lhs: UIntRouteLongAttribute, rhs: UIntRouteLongAttribute) -> 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.
public func entry(
point: RoutePoint
) -> UIntRouteLongEntry?
Элемент, в который попадает заданная точка.
Parameters
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [UIntRouteLongEntry]
Элементы, частично или полностью покрываемые отрезком [begin, end].
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
Voice
Голосовой пакет с озвучкой навигатора.
Extends: Package
Methods
public func playWelcome() -> Future<Void>
Воспроизвести образец голоса.
Returns
Future<>future, который становится готовым, когда проигрывание сэмпла завершается.
Properties
Получение голоса для использования в навигаторе.
var language
Язык озвучки в формате ISO 639-1.
VoiceManager
Интерфейс для взаимодействия со списком голосовых пакетов навигатора.
Extends: Hashable
public static func == (lhs: VoiceManager, rhs: VoiceManager) -> 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 voicesChannel
StatefulChannel<[Voice]>
Канал со списком всех известных голосовых пакетов. Обновляется в случае изменения информации о хотя бы об одном из голосов, либо об изменении состава списка. Содержимое канала является подмножеством общего списка пакетов. Во избежание рассинхронизации описаний пакетов, не следует использовать данные, получаемые одновременно из нескольких каналов, содержащих подмножества общего списка пакетов.
var voices
Канал со списком всех известных голосовых пакетов. Обновляется в случае изменения информации о хотя бы об одном из голосов, либо об изменении состава списка. Содержимое канала является подмножеством общего списка пакетов. Во избежание рассинхронизации описаний пакетов, не следует использовать данные, получаемые одновременно из н ескольких каналов, содержащих подмножества общего списка пакетов.
VoiceSelector
Управляет голосовыми пакетами в текущей сессии навигатора.
Extends: Hashable
public static func == (lhs: VoiceSelector, rhs: VoiceSelector) -> 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 voice
Голосовой пакет, с помощью которого воспроизводятся голосовые оповещения в текущей сессии навигатора.
VoidRouteAttribute
Контейнер, который описывает точечный атрибут маршрута. Каждый элемент хранится в виде точки на маршруте, в которой этот элемент расположен и значения самого элемента.
Extends: Hashable
public static func == (lhs: VoidRouteAttribute, rhs: VoidRouteAttribute) -> 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.
public func entries(
begin: RoutePoint,
end: RoutePoint
) -> [RoutePoint]
Элементы, попадающие в отрезок [begin, end).
Parameters
public func findNearBackward(
point: RoutePoint
) -> RoutePoint?
Найти ближайший элемент, позиция которого < = point.<br/>Сложность операции log2(N), где N = size.
Parameters
public func findNearForward(
point: RoutePoint
) -> RoutePoint?
Найти ближайший элемент, позиция которого >= point.<br/>Сложность операции log2(N), где N = size.
Parameters
Properties
var size
Количество элементов.
var isEmpty
Элементы отсутствуют.
var first
Первый элемент.
var last
Последний элемент.
var entries
Все элементы.
Widget
Базовый класс, представляющий виджет для фильтрации поисковой выдачи.
Extends: Hashable
public static func == (lhs: Widget, rhs: Widget) -> 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 type
Получение типа виджета.
var caption
Получение заголовка виджета. Может отсутствовать.
var filters
Получение списка фильтров, описывающих текущее состояние виджета. Может быть использован при формировании поискового запроса.
ZoomControl
ZoomControlModel
Модель контрола зумирования. Контрол состоит из кнопок +/-, при нажатии на которые меняется масштаб карты. При достижении допустимой границы масштаба кнопка масштабирования в этом направлении становится неактивной. Методы объекта необходимо вызывать на одном потоке.
Extends: Hashable
public static func == (lhs: ZoomControlModel, rhs: ZoomControlModel) -> 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.
public func isEnabled(
button: ZoomControlButton
) -> StatefulChannel<Bool>
Parameters
public func setPressed(
button: ZoomControlButton,
value: Bool
)
Parameters
ZoomFollowSettings
Интерфейс, позволяющий управлять настройками масштабирования карты во время ведения.
Extends: Hashable
public static func == (lhs: ZoomFollowSettings, rhs: ZoomFollowSettings) -> 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 speedRangeToStyleZoomSequence
Последовательность интервалов скоростей и соответствующих им масштабов. Используется для автоматического изменения масштаба в навигаторе в зависимости от скорости.
var speedRangeToStyleZoomFreeRoamSequence
Последовательность интервалов скоростей и соответствующих им масштабов при ведении в режиме FreeRoam. Используется для автоматического изменения масштаба в навигаторе в зависимости от скорости.
var styleZoomSpeedRangesAnimationDuration
Длительность плавного изменения масштаба в режиме ведения при изменении скорости при отсутствии манёвров впереди/позади на достаточно близком расстоянии, либо на дорогах низкого значения.
var zoomInBeforeManeuverAnimationDuration
Длительность плавного увеличения уровня зума при приближении к манёвру. Используется только если скорость ниже, чем в get_min_speed_to_consider_in_zoom_in_before_maneuver_animation.
var zoomOutAfterManeuverAnimationDuration
Длительность плавного уменьшения уровня масштабирования после проезда манёвра.
var minSpeedToConsiderInZoomInBeforeManeuverAnimation
Минимальная скорость движения в м/с, при которой длительность плавного изменения уровня зума будет рассчитываться с учётом не только близости к манёвру, но и с учётом текущей скорости. Должна быть не меньше 0.1 м/с, значения меньше будут игнорироваться.
var zoomInBeforeManeuverAnimationAcceleration
Коэффициент ускорения анимации увеличения уровня зума при приближении к манёвру. Должен быть не меньше 1, значения меньше будут игнорироваться.
var distanceGapToManeuver
Расстояние до манёвра, при достижении которого анимация плавного увеличения уровня зума должна быть завершена, чтобы во время манёвра зум не менялся. Например, если до маневра 300 м, то анимация с плавным увеличением уровня зума должна быть завершена за 50 м до начала маневра. Должно быть не меньше 1 м, значения меньше будут игнорироваться.
var minAnimationDuration
Минимальное время анимации. Используется для предотвращения резких изменений уровня зума при анимации. Должно быть не меньше 200, значения меньше будут игнорироваться.
ZoomViewModel
ViewModel для контрола зума
Extends: ObservableObject
Methods