Skip to main content

class

AnimationSettings​

Настройки анимаций объектов карты. Применяются для слоев стилей, в которых указан источник модели. Например, такими слоями являются слои с типами "3D model" и "Directional model". Индекс анимации должен быть обязательно указан для анимированной модели.

new AnimationSettings()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

animationIndex​

number|null

Индекс текущей анимации модели. Если null, то используется значение из стилей. Если в стилях значение не задано или задано отрицательное, никакая анимация не проигрывается.

animationName​

string|null

Название текущей анимации модели. Если null, то используется значение из стилей. Если в стилях значение не задано, никакая анимация не проигрывается.

animationRepeatCount​

number|null

Количество повторений анимации модели. Если null, то используется значение из стилей. Если в стилях значение не задано или задано отрицательное, анимация будет проигрываться бесконечно.

animationSpeed​

number|null

Скорость проигрывания анимации модели. Если null, то используется значение из стилей. Значения больше единицы ускоряют проигрывание, меньше замедляют. Если в стилях значение не задано, используется скорость по умолчанию.

sceneIndex​

number|null

Индекс текущей сцены модели. Если null, то используется значение из стилей. Если в стилях значение не задано или задано отрицательное, используется сцена по умолчанию, которая определена в самой модели.

sceneName​

string|null

Название текущей сцены модели. Если null, то используется значение из стилей. Если в стилях значение не задано, используется сцена по умолчанию, которая определена в самой модели.

Attributes​

Интерфейс для управления свойствами объекта карты.

Свойства есть только у объектов карты, но можно задавать свойства по умолчанию для всей карты, для стиля и для источника (подробнее см. ISource).

new Attributes()
Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
getAttributeValue(name: string): AttributeValue

Получение свойства.

Parameters

name

string

Имя свойства для получения.

Returns
removeAttribute(name: string): void

Удаление свойства.

Parameters

name

string

Имя свойства для удаления.

Returns
void
setAttributeValue(name: string, value: AttributeValue): void

Установка свойства.

Parameters

name

string

Название свойства.

value

Значение.

Returns
void
setAttributeValues(values: [string, AttributeValue][], attributesToRemove?: string[]): void

Установка набора свойств. Сначала удаляются свойства attributes_to_remove, затем добавляются свойства values. Если свойство с таким названием уже было добавлено, то оно заменяется.

Parameters

values

[string, AttributeValue][]

Набор пар "имя":"значение" для добавляемых свойства.

attributesToRemove?

string[]

Список имён свойств, которые нужно удалить. Default: []

Returns
void
Properties

attributeNames​

string[]

Получение списка свойств.

changed​

Получение канала, уведомляющего об изменении свойств.

AudioStreamReader​

new AudioStreamReader()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
read(): number[]

Описание типа функции обратного вызова, которую вызывает аудиодрайвер для чтения потока аудиоданных.

Returns
number[]

буфер, в который записывается аудиопоток.

Описание формата данных аудиопотока: Кодировка: LPCM (https://en.wikipedia.org/wiki/Pulse-code_modulation). Количество фреймов в пакете: 1. Количество семплов в фрейме: 1. Формат сэмпла: знаковое целое. Размер сэмпла: 16 бит. Количество каналов: 1. Частота дискретизации (Sample rate): 22050 семплов в секунду.

AvailableCallback​

new AvailableCallback()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
setAvailable(available: boolean): void

Доступность аудиоустройства приложению.

Parameters

available

boolean

Признак доступности аудиоустройства приложению.

Returns
void

BaseCamera​

Камера.

Задаёт параметры проецирования карты на экран.

new BaseCamera()
Returns
Methods
changePosition(positionChange: CameraPositionChange): void

Изменение только части параметров позиции камеры.

Вызов прерывает перелёт и обработку жестов, а также сбрасывает слежение за изменёнными параметрами, а при изменении координат также и слежение за стилевым уровнем масштабирования и направлением.

Parameters

positionChange

Returns
void
clone(): BaseCamera

Создание копии текущей камеры.

Returns
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

changed​

Получение причин изменения состояния камеры.

Измененные свойства доступны в соответствующих каналах.

deviceDensity​

Получение отношения DPI к базовому DPI устройства.

maxTiltRestriction​

Получение текущей функции зависимости максимального угла наклона камеры от стилевого уровня масштабирования.

padding​

Получение текущих отступов от краёв экрана.

position​

Получение текущей позиции камеры.

positionPoint​

Точка экрана, к которой привязана позиция камеры, задаётся с учётом отступов (padding).

projection​

Проекция.

Используется для получения точки экрана по точке карты и точки карты по точке экрана. Параметры камеры фиксируются в момент вызова.

size​

Получение размера области просмотра.

viewPoint​

Точка взгляда относительно полного размера вьюпорта.

viewportRestriction​

GeoRect|null

Получение ограничения на область видимости.

visibleArea​

Область пересечения пирамиды видимости камеры и поверхности карты.

visibleRect​

Объемлющий прямоугольник видимой области карты.

zoomRestrictions​

Получение актуальных ограничений уровня масштабирования.

BearingFollowController​

Контроллер слежения за направлением карты.

new BearingFollowController(bearingSource: BearingSource, animationDuration?: Duration, valueThreshold?: Bearing)

Создание контроллера слежения за направлением карты.

Parameters

bearingSource

источник информации о направлении.

animationDuration?

неотрицательная длительность изменения реального направления. Default: Duration.ofMilliseconds(1000)

valueThreshold?

неотрицательное пороговое значение учитываемого изменения реального направления. Default: new Bearing({ value: 1.0 })

Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean

BufferedChannel​

Channel with a buffered value. The value is null until the channel receives its first value.

Extends: Channel<T>
new BufferedChannel()
Methods
subscribe(callback: (value: T) => void): Connection

Subscribes to the channel events.

Parameters

callback

(value: T) => void

called on every new value

Returns
Connection

Connection used to unsubscribe

Properties

value​

T|null

Current value of the channel, or null if no value has been received yet.

Camera​

Камера для запуска перемещения карты и настроек слежения.

Extends: BaseCamera
new Camera()
Returns
Methods
addFollowController(followController: FollowController): void

Добавление контроллера слежения.

Их может быть несколько разных, например контроллер слежения за масштабом, за углом наклона карты, за геолокацией и т.д.

Parameters

followController

Returns
void
changePosition(positionChange: CameraPositionChange): void

Изменение только части параметров позиции камеры.

Вызов прерывает перелёт и обработку жестов, а также сбрасывает слежение за изменёнными параметрами, а при изменении координат также и слежение за стилевым уровнем масштабирования и направлением.

Parameters

positionChange

Returns
void
clone(): BaseCamera

Создание копии текущей камеры.

Returns
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
move(point: GeoPoint, zoom: Zoom, tilt: Tilt | null, bearing: Bearing, time?: Duration, animationType?: CameraAnimationType): Future<CameraAnimatedMoveResult>

Запуск анимированного перемещения карты с использованием встроенного контроллера перемещений карты.

Сбрасывает слежение за позицией, уровнем масштабирования и направлением и прерывает обработку жестов.

Если tilt задан, то сбрасывается слежение за наклоном.

Если tilt не задан и слежения за наклоном нет, то используется текущее значение наклона.

Parameters

point

точка конечной позиции камеры

zoom

уровень масштабирования в конечной позиции камеры

tilt

Tilt|null

наклон в конечной позиции камеры или пустое значение, если нужно в зависимости от активного режима слежения использовать значение из follow controller'а или текущее значение

bearing

поворот в конечной позиции камеры

time?

время, выделенное на перемещение карты Default: Duration.ofMilliseconds(300)

animationType?

тип анимации при перемещении камеры Default: CameraAnimationType.Default

Returns
moveToCameraPosition(position: CameraPosition, time?: Duration, animationType?: CameraAnimationType): Future<CameraAnimatedMoveResult>

Запуск анимированного перемещения карты с использованием встроенного контроллера перемещений карты.

Сбрасывает слежение за позицией, уровнем масштабирования, наклоном и направлением и прерывает обработку жестов.

Parameters

position

Конечная позиция камеры.

time?

Время, выделенное на перемещение карты. Default: Duration.ofMilliseconds(300)

animationType?

Тип анимации при перемещении камеры. Default: CameraAnimationType.Default

Returns
moveWithController(moveController: CameraMoveController): Future<CameraAnimatedMoveResult>

Запуск перемещения карты.

Сбрасывает текущий режим слежения карты и прерывает обработку жестов.

Parameters

moveController

Контроллер анимированного перемещения камеры.

Returns
processMovementAndStop(): void

Установка позиции камеры в соответствие с текущим временем и прекращение анимированного перемещения.

Вызов прерывает перелёт и обработку жестов, а также сбрасывает слежение за позицией, уровнем масштабирования и направлением.

Returns
void
removeCustomFollowController(): void

Удаление контроллера слежения, реализованного на платформе.

Returns
void
removeFollowController(followController: FollowController): void

Удаление контроллера слежения.

Parameters

followController

Returns
void
setBehaviour(behaviour: CameraBehaviour): void

Смена режима слежения камеры. Если новый режим более ограниченный, чем текущий, вызов прервёт перелёт и обработку жестов.

Parameters

behaviour

Returns
void
setCustomFollowController(followController: CustomFollowController): void

Добавление контроллера слежения, реализованного на платформе.

Можно установить только один такой контроллер. Если установить несколько контроллеров, то будет использоваться только последний установленный.

Parameters

followController

Returns
void
Properties

behaviour​

Режим слежения камеры.

changed​

Получение причин изменения состояния камеры.

Измененные свойства доступны в соответствующих каналах.

deviceDensity​

Получение отношения DPI к базовому DPI устройства.

maxTiltRestriction​

Получение текущей функции зависимости максимального угла наклона камеры от стилевого уровня масштабирования.

padding​

Получение текущих отступов от краёв экрана.

position​

Получение текущей позиции камеры.

positionPoint​

Точка экрана, к которой привязана позиция камеры, задаётся с учётом отступов (padding).

projection​

Проекция.

Используется для получения точки экрана по точке карты и точки карты по точке экрана. Параметры камеры фиксируются в момент вызова.

size​

Получение размера области просмотра.

state​

Получение актуального состояния камеры.

viewPoint​

Точка взгляда относительно полного размера вьюпорта.

viewportRestriction​

GeoRect|null

Получение ограничения на область видимости.

visibleArea​

Область пересечения пирамиды видимости камеры и поверхности карты.

visibleRect​

Объемлющий прямоугольник видимой области карты.

zoomRestrictions​

Получение актуальных ограничений уровня масштабирования.

CameraTransactionGuard​

new CameraTransactionGuard()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean

CancelEvent​

Событие отмены текущего действия.

Вызывается, например, при отмене жеста, потере фокуса окна или при потере захвата мыши. Также может быть вызван изнутри карты при смене ограничений уровня масштабирования, некоторых изменениях режима слежения и установке интерактивного режима карты.

Extends: Event
new CancelEvent()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean

CategoriesPage​

Страница результатов запроса категорий.

new CategoriesPage()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
fetchNextPage(): Future<CategoriesPage | null>

Получить следующую страницу результатов.

Returns
Future<CategoriesPage | null>

future, резолвящаяся в ненулевой указатель на следующую страницу, если страница успешно получена future, резолвящаяся в нулевой указатель, если следующая страница отсутствует exceptional future, если произошла ошибка при получении страницы

fetchPrevPage(): Future<CategoriesPage | null>

Получить предыдущую страницу результатов.

Returns
Future<CategoriesPage | null>

future, резолвящаяся в ненулевой указатель на предыдущую страницу, если страница успешно получена future, резолвящаяся в нулевой указатель, если предыдущая страница отсутствует exceptional future, если произошла ошибка при получении страницы

Properties

items​

Категории этой страницы.

Category​

Категория справочника.

new Category()
Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

alias​

string

Транслитерированное название категории.

при отсутствии может быть пустой строкой.

branchCount​

bigint

Количество филиалов организаций в данной категории.

caption​

string

Короткая подпись к иконке для отображения в UI.

при отсутствии может быть пустой строкой.

children​

Дочерние категории.

geoCount​

bigint

Количество геообъектов в данной категории.

iconUrl​

string

Ссылка на изображение.

при отсутствии может быть пустой строкой.

id​

Идентификатор категории.

isReviewableOnFlamp​

boolean

Разрешены ли отзывы к организациям этой категории непосредственно на flamp.ru.

keyword​

string

Ключевое слово, по которому была найдена категория.

при отсутствии может быть пустой строкой.

name​

string

Название категории.

orgCount​

bigint

Количество организаций в данной категории.

parentId​

Идентификатор родительской категории.

при отсутствии может быть пустой строкой.

seoName​

string

SEO-синоним.

при отсутствии может быть пустой строкой.

suggestIcon​

string

Иконка категории для выдачи suggest.

при отсутствии может быть пустой строкой.

tag​

string

Уникальное имя, которое можно использовать как часть имени файла-иконки.

при отсутствии может быть пустой строкой.

title​

string

Заголовок для отображения в UI.

при отсутствии может быть пустой строкой.

type​

Тип категории.

CategoryGetByIdsQueryBuilder​

Построитель запроса получения категорий по идентификаторам.

new CategoryGetByIdsQueryBuilder(ids: RubricId[])

Начать построение запроса получения категорий по идентификаторам.

Parameters
Methods
build(): CategoryQuery

Сформировать запрос категорий.

destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
setGeoContext(geoContext: CategoryGeoContext | null): CategoryGetByIdsQueryBuilder

Задать географический контекст запроса. Если не задан, то география будет определяться с помощью LocationService.

Parameters
setLocale(locale: Locale | null): CategoryGetByIdsQueryBuilder

Задать локаль для запроса категорий.

Parameters

CategoryListQueryBuilder​

Построитель запроса списка категорий.

new CategoryListQueryBuilder()

Начать построение запроса списка категорий.

Methods
build(): CategoryQuery

Сформировать запрос категорий.

destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
setGeoContext(geoContext: CategoryGeoContext | null): CategoryListQueryBuilder

Задать географический контекст запроса. Если не задан, то география будет определяться с помощью LocationService.

Parameters
setLocale(locale: Locale | null): CategoryListQueryBuilder

Задать локаль для запроса категорий.

Parameters
setPageSize(pageSize: number): CategoryListQueryBuilder

Задать размер страницы.

Parameters

pageSize

number
Returns
setParentId(parentId: RubricId | null): CategoryListQueryBuilder

Задать родителя для запроса списка категорий.

Parameters
setSortType(sortType: CategorySortType): CategoryListQueryBuilder

Задать сортировку для запроса списка категорий.

Parameters

CategoryQuery​

Запрос категорий.

new CategoryQuery()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean

CategorySearchQueryBuilder​

Построитель запроса поиска категорий по тексту.

new CategorySearchQueryBuilder(queryText: string)

Начать построение запроса поиска категорий по тексту.

Parameters

queryText

string
Returns
Methods
build(): CategoryQuery

Сформировать запрос категорий.

destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
setGeoContext(geoContext: CategoryGeoContext | null): CategorySearchQueryBuilder

Задать географический контекст запроса. Если не задан, то география будет определяться с помощью LocationService.

Parameters
setLocale(locale: Locale | null): CategorySearchQueryBuilder

Задать локаль для запроса категорий.

Parameters
setPageSize(pageSize: number): CategorySearchQueryBuilder

Задать размер страницы.

Parameters

pageSize

number
Returns

Channel​

Reactive stream of values from the C++ SDK. Subscribe with subscribe, unsubscribe with Connection.disconnect().

new Channel()
Returns
Methods
subscribe(callback: (value: T) => void): Connection

Subscribes to the channel events.

Parameters

callback

(value: T) => void

called on every new value

Returns
Connection

Connection used to unsubscribe

CheckableGroupedItem​

Единичный элемент из GroupCheckableItem.

new CheckableGroupedItem()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

isChecked​

boolean

Получение состояния элемента.

text​

string

Получение текстового описания элемента.

values​

string[]

Получение списка значений, по которым происходит фильтрация. Обычно одно значение.

CheckableItem​

Базовое представление отмечаемого элемента из CheckableItemsGroup.

new CheckableItem()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

filterType​

Получение списка фильтров, описывающих текущее состояние виджета. Может быть использован при формировании поискового запроса.

type​

Получение типа отмечаемого элемента.

CheckableItemsGroup​

Виджет для представления группы отмечаемых элементов.

Extends: Widget
new CheckableItemsGroup()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

caption​

string|null

Получение заголовка виджета. Может отсутствовать.

filters​

Получение списка фильтров, описывающих текущее состояние виджета. Может быть использован при формировании поискового запроса.

items​

Получение группы элементов виджета.

type​

Получение типа виджета.

Checkbox​

Виджет-чекбокс.

Extends: Widget
new Checkbox()
Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

caption​

string|null

Получение заголовка виджета. Может отсутствовать.

checkedText​

string|null

Получение текста подписи для "отмеченного" чекбокса.

filters​

Получение списка фильтров, описывающих текущее состояние виджета. Может быть использован при формировании поискового запроса.

filterType​

Получение типа фильтра, который представляет виджет.

isChecked​

boolean

Получение состояния виджета.

type​

Получение типа виджета.

uncheckedText​

string|null

Получение текста подписи для "неотмеченного" чекбокса.

values​

string[]

Получение списка значений, по которым происходит фильтрация. Обычно одно значение.

Circle​

Окружность.

new Circle(options: CircleOptions)
Parameters

options

Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

bounds​

Прямоугольник минимального размера, содержащий геометрию.

color​

Цвет заливки окружности.

dashedStrokeOptions​

Получение параметров пунктирной обводки

isVisible​

boolean

levelId​

LevelId|null

Получение привязки объекта к этажу в здании.

position​

Местоположение центра окружности.

radius​

Радиус окружности.

strokeColor​

Цвет границы окружности.

strokeWidth​

Ширина линии границы окружности.

userData​

object|null

Произвольные пользовательские данные, прикрепленные к объекту.

zIndex​

Получение уровня отрисовки объекта.

ClusterObject​

Кластер объектов.

Extends: MapObject
new ClusterObject()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

geometryObject​

Получение геометрического объекта кластера.

objectCount​

number

Получение количества маркеров в кластере.

objects​

Получение списка маркеров в кластере.

position​

Получение позиции кластера на карте.

userData​

object|null

Произвольные пользовательские данные, прикрепленные к объекту.

CommonGestureSettings​

new CommonGestureSettings()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

recognizeSettings​

Общие настройки распознавания жестов.

CompassControlModel​

Модель контрола компаса. Контрол состоит из кнопки компаса, при нажатии на которую камера карты меняет угол в направлении севера. Если камера карты смотрит на сервер, то контрол необходимо скрывать. Потокобезопасно.

new CompassControlModel(map: Map)
Parameters
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
onClicked(): void
Returns
void
Properties

ComplexGeometry​

Составная геометрия, состоит из набора простых или составных геометрий.

Поддерживается произвольный уровень вложенности составных геометрий в наборе.

Extends: Geometry
new ComplexGeometry(geometries: Geometry[])
Parameters

geometries

Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
intersects(geometry: Geometry): boolean

Функция intersects позволяет определить, имеет ли данная геометрия пересечение с другим объектом геометрии

Parameters

geometry

объект геометрии для проверки пересечения При вычислении пересечения с IPointGeometry высота (elevation) игнорируется

Returns
boolean
Properties

bounds​

Прямоугольник минимального размера, содержащий геометрию.

elements​

kind​

maxPoint​

Максимальная точка ограничивающего прямоугольника.

minPoint​

Минимальнная точка ограничивающего прямоугольника.

Connection​

Subscription to a channel. Call disconnect() to unsubscribe.

Important: keep a reference to the Connection for as long as the subscription is needed. If the reference is lost, the GC may collect the object and the subscription will be disconnected.

new Connection()
Returns
Methods
disconnect(): void

Unsubscribes from the channel. Idempotent: a repeated call is safe.

Returns
void

Context​

Контекст - окружение, необходимое для работы SDK.

new Context()
Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean

CoordinatesFollowController​

Контроллер слежения за координатами позиции карты.

new CoordinatesFollowController(animationDuration?: Duration, valueThreshold?: Meter)

Создание контроллера слежения за координатами позиции карты.

Parameters

animationDuration?

длительность изменения реальной позиции. Default: Duration.ofMilliseconds(1000)

valueThreshold?

неотрицательное пороговое значение учитываемого изменения реальной позиции. Default: new Meter({ value: 0.1 })

Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean

DefaultRoadEventFilter​

Фабрика для создания стандартных временных фильтров дорожных событий.

new DefaultRoadEventFilter()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
create(context: Context, displayCategories: EnumSet<RoadEventDisplayCategory> | null, startTimeCutoff: Duration | null): RoadEventFilter

Создает фильтр отображаемых дорожных событий на карте.

Parameters

context

Контекст.

displayCategories

Категории событий, которые нужно отображать на карте. Если не задано — фильтрация по категориям не применяется.

startTimeCutoff

Максимально допустимое время начала события относительно текущего момента. События с start_time позже этого порога будут скрыты. Например, +1d — скрыть события, которые начнутся позже чем через сутки. События без start_time не фильтруются. Если не задано — фильтрация по времени начала не применяется.

Returns

DGis​

new DGis()
Returns
Methods
createContext(httpOptions?: HttpOptions, logOptions?: LogOptions, vendorConfig?: VendorConfig, keySource?: KeySource, dataCollectionConsent?: PersonalDataCollectionConsent, locationProvider?: LocationProvider | null, headingProvider?: HeadingProvider | null): Context

Must be called before using any SDK service.

Parameters

httpOptions?

HTTP client settings.

logOptions?

logging parameters.

vendorConfig?

SDK configuration override.

keySource?

SDK key source. Defaults to asset dgissdk.key.

dataCollectionConsent?

user consent for data collection and processing.

locationProvider?

optional custom location provider implementation.

headingProvider?

optional custom heading provider implementation.

Returns
Context

SDK context required by SDK services.

releaseContext(context: Context): void

Releases the SDK context and its resources.

Before calling, ensure all SDK objects (maps, markers, data sources, etc.) are released. After a successful call, the previously created context becomes invalid. To create a new context, call createContext again.

Parameters

context

SDK context previously returned by createContext.

Returns
void

DgisMapObject​

Объект карты 2GIS.

информацию об объекте можно получить через справочник (directory)

Extends: MapObject
new DgisMapObject()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

id​

Стабильный числовой идентификатор объекта.

userData​

object|null

Произвольные пользовательские данные, прикрепленные к объекту.

DgisSource​

Основной интерфейс источников данных 2ГИС.

Extends: Source
new DgisSource()
Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
setHighlighted(directoryObjectIds: DgisObjectId[], highlighted: boolean): void

Установка или снятие выделения объектов.

добавляет объекту атрибут "selected", который можно использовать в стилях.

Parameters

directoryObjectIds

Идентификаторы изменяемых объектов.

highlighted

boolean

Установка или снятие выделения.

Returns
void
createDgisSource(context: Context): Source

Создание источника, получающего данные с серверов 2ГИС.

Parameters

context

Returns
createImmersiveDgisSource(context: Context): Source

Создание источника, получающего реалистичные данные с серверов 2ГИС.

Parameters

context

Returns
Properties

highlightedObjects​

Получение списка идентификаторов выделенных объектов.

highlightedObjectsChannel​

Получение списка идентификаторов выделенных объектов.

DirectMapControlBeginEvent​

Событие начала прямого управления картой. Сообщает карте, что необходимо обрабатывать события прямого управления картой. События прямого управления работают только от DirectMapControlBeginEvent до DirectMapControlEndEvent. После завершения последовательности событий прямого управления может запуститься кинематика. Кинематика использует время возникновения события, поэтому лучше использовать время, полученное от системы, а не заполнять значение при обработке. Пока кинематика работает только для перемещения карты, но не для вращения и масштабирования.

Extends: Event
new DirectMapControlBeginEvent()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean

DirectMapControlEndEvent​

Событие окончания прямого управления картой. Завершает прямое управление картой, начатое после получения события DirectMapControlBeginEvent. О событиях прямого управления картой описано в DirectMapControlBeginEvent.

Extends: InputEvent
new DirectMapControlEndEvent(timestamp: Duration)
Parameters
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

timestamp​

Получение времени регистрации события ввода.

DirectMapRotationEvent​

Событие прямого вращения карты. О событиях прямого управления картой описано в DirectMapControlBeginEvent.

Extends: InputEvent
new DirectMapRotationEvent(bearingDelta: Bearing, timestamp: Duration, rotationCenter?: ScreenPoint | null)
Parameters

bearingDelta

изменение угла поворота карты, в градусах. Положительные значения соответствуют направлению вращения против часовой стрелки

timestamp

Время генерации системного события.

rotationCenter?

Точка на экране, вокруг которой вращается карта. Если точка не задана, то вращение происходит относительно точки позиции карты. Default: null

Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

bearingDelta​

Изменение угла поворота карты.

rotationCenter​

Точка на экране, вокруг которой вращается карта.

timestamp​

Получение времени регистрации события ввода.

DirectMapScalingEvent​

Событие прямого масштабирования карты. События прямого управления картой описаны в DirectMapControlBeginEvent.

Extends: InputEvent
new DirectMapScalingEvent(zoomDelta: number, timestamp: Duration, scalingCenter?: ScreenPoint | null)
Parameters

zoomDelta

number

Величина, на которую изменится текущее значение масштаба.

timestamp

Время генерации системного события.

scalingCenter?

Точка на экране, относительно которой масштабируется карта. Если точка не задана, то масштабирование происходит относительно точки позиции карты. Default: null

Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

scalingCenter​

Точка на экране, относительно которой масштабируется карта.

timestamp​

Получение времени регистрации события ввода.

zoomDelta​

number

Величина, на которую изменится текущее значение масштаба.

DirectMapShiftEvent​

Событие прямого сдвига карты. События прямого управления картой описаны в DirectMapControlBeginEvent.

Extends: InputEvent
new DirectMapShiftEvent(screenShift: ScreenShift, shiftedPoint: ScreenPoint, timestamp: Duration)
Parameters

screenShift

Изменение экранной позиции карты относительно предыдущей, в пикселях.

shiftedPoint

Центральная точка, от которой производится смещение карты.

timestamp

Время генерации системного события.

Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

screenShift​

Изменение экранной позиции карты.

shiftedPoint​

Центральная точка, от которой производится смещение карты.

timestamp​

Получение времени регистрации события ввода.

DirectMapTiltEvent​

Событие прямого наклона камеры. События прямого управления картой описаны в DirectMapControlBeginEvent.

Extends: InputEvent
new DirectMapTiltEvent(delta: number, timestamp: Duration)
Parameters

delta

number

Изменение угла наклона в градусах.

timestamp

Время генерации системного события.

Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

delta​

number

Изменение угла наклона в градусах.

timestamp​

Получение времени регистрации события ввода.

DirectoryObject​

Объект справочника.

new DirectoryObject()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
formattedAddress(type: FormattingType): FormattedAddress | null

Cтроковое представление адреса, отформатированное в соответствии с указанным требованием к длине.

Parameters
publicTransportScheduleInfo(departureTimeUtc: bigint): Future<PublicTransportDirectoryScheduleInfo | null>

Информация о расписаниях платформ и направлений.

Parameters

departureTimeUtc

bigint

Время в системе UNIX по UTC, на которое необходимо получить расписание.

Returns
Properties

address​

Address|null

Адрес объекта в виде набора компонент.

attributes​

Дополнительные атрибуты объекта.

branchesInfo​

Информация о связанных организациях.

buildingInfo​

Информация о здании.

chargingStation​

Атрибуты для электрозаправки.

contactInfos​

Контакты объекта.

contextAttributes​

Контекстные дополнительные атрибуты объекта.

description​

string

Описание объекта.

entrances​

Информация о входах.

Для получения данной информации запросите дополнительную настройку ключа.

group​

Связанные в объединённую карточку объекты.

Для получения данной информации запросите дополнительную настройку ключа.

id​

Стабильный числовой идентификатор объекта.

levelId​

LevelId|null

Идентификатор этажа, на котором расположен объект.

Для получения данной информации запросите дополнительную настройку ключа.

markerPosition​

Точка объекта, где следует разместить маркер.

nearestParkingIds​

Ближайшие парковки.

nearestPlatforms​

Ближайшие остановочные платформы.

nearestStations​

Ближайшие остановки.

openingHours​

Время работы объекта.

orgInfo​

OrgInfo|null

Информация об организации.

parkingInfo​

Дополнительная информация о парковке.

platformIds​

Справочная информация о идентификаторах платформ общественного транспорта. Поле заполняется только при поиске по идентификатору объекта.

Для входа на станцию (тип ObjectType.StationEntrance) и станции метро (тип ObjectType.StationMetro) содержит информацию обо всех идентификаторах платформ.

reviews​

Reviews|null

Отзывы.

routeInfos​

Справочная информация о маршрутах общественного транспорта. Поле заполняется только при поиске по идентификатору объекта.

Для маршрута (тип ObjectType.Route) содержит информацию только об одном маршруте. Для остановочной платформы (тип ObjectType.StationPlatform), станции метро (тип ObjectType.StationMetro) и входа на станцию (тип ObjectType.StationEntrance) содержит информацию обо всех маршрутах, которые проходят через объект.

rubricIds​

Идентификаторы рубрик.

subtitle​

string

Подзаголовок объекта.

при отсутствии может быть пустой строкой

timeZoneOffset​

Сдвиг локального времени объекта относительно UTC в секундах в текущий момент.

title​

string

Заголовок объекта.

titleAddition​

string

Дополнительная информация заголовка Пример: "(кв. 1-12)"

Для получения данной информации запросите дополнительную настройку ключа.

tradeLicense​

Данные о лицензии организации.

Для получения данной информации запросите дополнительную настройку ключа.

types​

Тип объекта. Может быть несколько, например, ТЦ Сан Сити - филиал организации и здание одновременно. Первый тип в этом списке - основной.

workStatus​

Статус работы.

Duration​

Duration stored in milliseconds. Created with the factory methods ofMilliseconds, ofSeconds, ofMinutes.

Methods
ofMilliseconds(ms: number): Duration
Parameters

ms

number

number of milliseconds

Returns
ofMinutes(minutes: number): Duration
Parameters

minutes

number

number of minutes

Returns
ofSeconds(seconds: number): Duration
Parameters

seconds

number

number of seconds

Returns
Properties

milliseconds​

number

Duration in milliseconds.

minutes​

number

Duration in minutes.

seconds​

number

Duration in seconds.

EnumSet​

Set of flags (bitmask) for an enum type. Created with the factory method of(). Supports iteration, adding, removing and checking individual flags.

Methods
[iterator](): Iterator<T>

Iterates over the flags that are set.

Returns
Iterator<T>
add(value: T): EnumSet<T>

Adds a flag to the set.

Parameters

value

T

flag to add

Returns
addAll(values: Iterable<T>): EnumSet<T>

Adds several flags to the set.

Parameters

values

Iterable<T>

flags to add

Returns
addAllFrom(other: EnumSet<T>): EnumSet<T>

Adds all flags of the other set.

Parameters

other

source set

Returns
clear(): void

Clears the set.

Returns
void
containsAll(values: Iterable<T>): boolean

Checks that the set contains all the listed flags.

Parameters

values

Iterable<T>

flags to check

Returns
boolean
containsAllFrom(other: EnumSet<T>): boolean

Checks that this set contains all flags of the other set.

Parameters

other

the other set

Returns
boolean
difference(other: EnumSet<T>): EnumSet<T>

Difference: flags present in this set but not in the other.

Parameters

other

the other set

Returns
equals(other: EnumSet<T>): boolean

Compares two sets by mask.

Parameters

other

the other set

Returns
boolean
has(value: T): boolean

Checks whether the set contains the flag.

Parameters

value

T

flag to check

Returns
boolean
intersection(other: EnumSet<T>): EnumSet<T>

Intersection: flags present in both sets.

Parameters

other

the other set

Returns
remove(value: T): EnumSet<T>

Removes a flag from the set.

Parameters

value

T

flag to remove

Returns
removeAll(values: Iterable<T>): EnumSet<T>

Removes several flags from the set.

Parameters

values

Iterable<T>

flags to remove

Returns
removeAllFrom(other: EnumSet<T>): EnumSet<T>

Removes all flags that are present in the other set.

Parameters

other

set of flags to remove

Returns
toSet(): Set<T>

Converts to a JS Set.

Returns
Set<T>

Set with the flags that are set

union(other: EnumSet<T>): EnumSet<T>

Union: flags present in at least one of the sets.

Parameters

other

the other set

Returns
of(enumObj: Record<string, T | string>, values: T[]): EnumSet<T>

Creates an EnumSet from the listed values.

Parameters

enumObj

Record<string, T | string>

enum object (for example, Permission)

values

T[]

values to include in the set

Returns
Properties

isEmpty​

boolean

Whether the set is empty.

isNotEmpty​

boolean

Whether the set is non-empty.

rawValue​

number

Numeric value of the mask.

Event​

Базовый класс для всех обрабатываемых событий.

new Event()
Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean

File​

Идентификатор файла.

Может являться не только файлом на файловой системе, но и произвольным источником данных.

new File(path: string)

Файл в файловой системе.

Parameters

path

string

Путь к файлу.

Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
fromString(contents: string): File

Файл с содержимым из заданной строки.

Parameters

contents

string

Содержимое файла.

Returns

FollowController​

Класс, позволяющий управлять положением камеры. Реализации всех его методов должны быть потокобезопасны. У большинства методов есть тривиальные реализации по умолчанию (таким образом FollowController, отвечающий за масштаб, не обязан переопределять методы coordinates() и т.п.). Один контроллер может быть единомоментно добавлен только в одну карту.

new FollowController()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean

Future​

Wrapper around a C++ future: an asynchronous result that arrives later.

Important: keep a reference to the Future until the result arrives. If the reference is lost, the GC may collect the object and the callback will never be called.

Lifecycle:

  1. Get a Future from an SDK method and keep a reference to it
  2. Call onComplete to subscribe to the result
  3. Call destroy to release the native resources

A Future is single-use: onComplete can be called only once. After destroy any call throws an error.

new Future()
Returns
Methods
destroy(): void

Releases the native resources. Idempotent: a repeated call is safe.

Returns
void
onComplete(onResult: (result: T) => void, onError: (error: string) => void): void

Subscribes to the result of the future. Can be called only once: a repeated call throws an error.

Parameters

onResult

(result: T) => void

called with the result on successful completion

onError

(error: string) => void

called with an error message on failure

Returns
void
toPromise(): Promise<T>

Converts the future into a Promise. The future is destroyed automatically after it settles.

Returns
Promise<T>

Geometry​

Объект геометрии.

new Geometry()
Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
intersects(geometry: Geometry): boolean

Функция intersects позволяет определить, имеет ли данная геометрия пересечение с другим объектом геометрии

Parameters

geometry

объект геометрии для проверки пересечения При вычислении пересечения с IPointGeometry высота (elevation) игнорируется

Returns
boolean
Properties

bounds​

Прямоугольник минимального размера, содержащий геометрию.

kind​

maxPoint​

Максимальная точка ограничивающего прямоугольника.

minPoint​

Минимальнная точка ограничивающего прямоугольника.

GeometryMapObject​

Геометрический объект карты.

методы потокобезопасны

объект будет отображаться на карте при выполнении следующих условий:

  • объект видимый;
  • объект добавлен в источник данных;
  • источник данных, содержащий объект, добавлен в карту;
  • в стилях, установленных в карту, есть параметры отображения, применимые к этому объекту. Подробнее про отображение на карте - см. ISource.
Extends: MapObject
new GeometryMapObject()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

animationSettings​

Получение настроек анимации. Применяется для объектов с типом "3D model" или "Directional model".

bounds​

Прямоугольник минимального размера, содержащий геометрию.

geometry​

Геометрия объекта.

geometryChannel​

Геометрия объекта.

isDraggable​

boolean

Текущий флаг перемещаемости объекта.

isDraggableChannel​

Текущий флаг перемещаемости объекта.

isVisible​

boolean

Текущий флаг видимости объекта.

isVisibleChannel​

Текущий флаг видимости объекта.

objectAttributes​

Получение свойств объекта карты для чтения и изменения.

userData​

object|null

Произвольные пользовательские данные, прикрепленные к объекту.

GeometryMapObjectBuilder​

Класс для установки свойств и последующего создания геометрических объектов.

new GeometryMapObjectBuilder()
Methods
createObject(): GeometryMapObject

Конструирование объекта карты.

у объекта обязательно должна быть установлена геометрия

после вызова этой функции GeometryMapObjectBuilder непригоден для задания параметров объекта карты или для его создания

destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
setDraggable(draggable: boolean): GeometryMapObjectBuilder

Установка возможности перетаскивания объекта карты.

Parameters

draggable

boolean
Returns
setGeometry(geometry: Geometry): GeometryMapObjectBuilder

Установка геометрии объекта карты.

Parameters
setObjectAttribute(name: string, value: AttributeValue): GeometryMapObjectBuilder

Установка свойства объекта карты.

Parameters

name

string

Имя свойства объекта карты.

value

Значение свойства объекта карты.

Returns
setObjectAttributes(values: [string, AttributeValue][]): GeometryMapObjectBuilder

Установка свойств объекта карты.

Parameters

values

[string, AttributeValue][]

набор пар "имя":"значение" для добавляемых свойства объекта карты

метод не заменяет весь набор свойств объекта, т.е. если свойство в values отсутствует, но уже добавлено в объект ранее, оно не будет изменено.

Returns
setUserData(userData: object | null): GeometryMapObjectBuilder

Установка пользовательских данных.

пользовательские данные никак не используются в SDK и нужны только чтобы возвращать их пользователю.

Parameters

userData

object|null
Returns
setVisible(visible: boolean): GeometryMapObjectBuilder

Установка видимости объекта карты.

Parameters

visible

boolean
Returns

GeometryMapObjectSource​

Источник геометрических объектов карты.

Extends: Source
new GeometryMapObjectSource()
Methods
addObject(item: GeometryMapObject): void

Добавление объекта в источник.

Добавление объектов по группой эффективнее, чем добавление по одному, особенно в случае, когда источник уже добавлен в одну или несколько карт.

Добавление асинхронное, потокобезопасное, метод можно использовать из любого потока.

Для источника с кластеризацией добавление пока не реализовано, будет выброшено исключение.

Parameters

item

Returns
void
addObjects(objects: GeometryMapObject[]): void

Добавление нескольких объектов в источник.

Добавление объектов по группой эффективнее, чем добавление по одному, особенно в случае, когда источник уже добавлен в одну или несколько карт.

Добавление асинхронное, потокобезопасное, метод можно использовать из любого потока.

Для источника с кластеризацией добавление пока не реализовано, будет выброшено исключение.

Parameters

objects

Returns
void
clear(): void

Удаление всех объектов из источника.

Returns
void
clusteringObjects(position: CameraPosition): MapObject[]

Получить список объектов, участвующих в кластеризации при переданной позиции камеры. В списке будут присутствовать как кластеры, так и геометрические объекты.

Parameters
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
removeAndAddObjects(objectsToRemove: GeometryMapObject[], objectsToAdd: GeometryMapObject[]): void

Удаление и добавление объектов в источник.

Parameters

objectsToRemove

objectsToAdd

Returns
void
removeObject(item: GeometryMapObject): void

Удаление объекта из источника.

Удаление асинхронное, потокобезопасное, метод можно использовать из любого потока.

Parameters

item

Returns
void
removeObjects(objects: GeometryMapObject[]): void

Удаление объектов из источника.

Parameters

objects

Returns
void
Properties

objects​

Получить все объекты, добавленные в источник.

sourceAttributes​

Получение значений свойств по умолчанию для всех объектов, добавленных в источник (см. IAttributes).

GeometryMapObjectSourceBuilder​

new GeometryMapObjectSourceBuilder(context: Context)
Parameters
Methods
addObject(item: GeometryMapObject): GeometryMapObjectSourceBuilder

Добавление геометрического объекта карты в источник.

Parameters
addObjects(objects: GeometryMapObject[]): GeometryMapObjectSourceBuilder

Добавление нескольких геометрических объектов карты в источник.

Parameters
createSource(): GeometryMapObjectSource

Создание источника геометрических объектов.

после вызова этой функции использовать GeometryMapObjectSourceBuilder для создания источника данных или для задания параметров источника данных нельзя

destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
setSourceAttribute(name: string, value: AttributeValue): GeometryMapObjectSourceBuilder

Установка свойства объектов карты, общего для всего источника (см. ISource).

Parameters

name

string

Имя свойства.

value

Значение свойства.

Returns
setSourceAttributes(values: [string, AttributeValue][]): GeometryMapObjectSourceBuilder

Установка свойств объектов карты, общих для всего источника.

Parameters

values

[string, AttributeValue][]

набор пар "имя":"значение" свойств

Returns

GestureManager​

Класс для управления обработкой жестов.

new GestureManager()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
disableGesture(gesture: TransformGesture): void
Parameters

gesture

Returns
void
enableGesture(gesture: TransformGesture): void
Parameters

gesture

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
gestureEnabled(gesture: TransformGesture): boolean
Parameters

gesture

Returns
boolean
setMutuallyExclusiveGestures(rules: EnumSet<TransformGesture>[]): void

Установка списка правил исключения одновременного срабатывания нескольких жестов.

К переданному списку правил добавляются правила по умолчанию, которые не позволяют жесту управления наклоном срабатывать одновременно с другими жестами. Каждое правило представляет собой перечень жестов, которые не могут срабатывать одновременно Например, если в правиле указать жесты Scaling и Rotation то эти жесты не будут работать одновременно В случае одновременного выполнения жестов из правила, сработает жест с большим приоритетом Порядок приоритета жестов (по убыванию): (Shift ->) Tilt -> Scaling -> Rotation -> MultiTouchShift

Parameters
Properties

GroupCheckableItem​

Набор отмечаемых элементов, работающих как радио-группа.

Extends: CheckableItem
new GroupCheckableItem()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

filterType​

Получение списка фильтров, описывающих текущее состояние виджета. Может быть использован при формировании поискового запроса.

items​

Получение набора элементов группы.

type​

Получение типа отмечаемого элемента.

HeadingAvailableNotifier​

Интерфейс для реализации функционала обратного вызова, который оповещает о доступности источника направления. Источник направления считается доступным, если он в состоянии отслеживать текущее направление и оповещать об ее изменении.

new HeadingAvailableNotifier()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
send(available: boolean): void
Parameters

available

boolean
Returns
void

HeadingNotifier​

Интерфейс для реализации функционала обратного вызова, который возвращает измеренное платформой направление.

new HeadingNotifier()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
send(platformHeading: PlatformHeading): void
Parameters

platformHeading

Returns
void

HttpCacheManager​

Интерфейс управления HTTP-кешем.

new HttpCacheManager()
Methods
clear(): void

Очистка содержимого HTTP-кеша.

Returns
void
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
get(context: Context): HttpCacheManager | null

Интерфейс управления HTTP-кешем. Null, если HTTP кэш не используется.

Parameters

context

Returns
Properties

currentSize​

bigint

Текущий размер HTTP-кеша

maxSize​

bigint

Максимальный размер HTTP-кеша

HttpResponseCallback​

Объект с обратными вызовами для обработки отправки и получения данных.

new HttpResponseCallback()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
onFinished(): void

Метод, оповещающий об окончании обработки запроса. Необходимо вызывать в конце процесса обработки. Даже если запрос был отменен на стороне SDK.

Отсутствие вызова метода может привести к отказу работы сети в SDK.

Returns
void
onReceive(body: number[], size: number): boolean

Метод, обрабатывающий получение тела ответа. Обработка может вестись по частям.

Parameters

body

number[]

тело (или его часть) ответа от сервера.

size

number

размер данных в байтах.

Returns
boolean

возвращает false если SDK отменил отправку/обработку запроса.

При обработке присутствует копирование данных для передачи из Java в с++. Рекомендуется передавать данные небольшими кусками.

onResponse(response: HttpResponse): boolean

Метод, обрабатывающий получение ответа от сервера.

Parameters

response

ответ от сервера.

Returns
boolean

возвращает false если SDK отменил отправку/обработку запроса.

Image​

Изображение.

Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean

ImageLoader​

Класс для загрузки изображений.

new ImageLoader(sdkContext: Context)
Parameters

sdkContext

Returns
Methods
loadLottieFromAsset(source: AssetSource): Promise<Image>

Загрузить Lottie JSON из assets.

Parameters

source

Returns
Promise<Image>
loadLottieFromByteData(data: ByteDataLike): Image

Загрузить Lottie JSON из бинарных данных.

Parameters
loadLottieFromFile(source: FileSource): Promise<Image>

Загрузить Lottie JSON из файла.

Parameters

source

Returns
Promise<Image>
loadPngFromAsset(source: AssetSource, height: number, width: number): Promise<Image>

Загрузить PNG изображение из assets.

Parameters

source

height

number

width

number
Returns
Promise<Image>
loadPngFromByteData(data: ByteDataLike, height: number, width: number): Image

Загрузить PNG изображение из бинарных данных.

Parameters

data

height

number

width

number
Returns
loadPngFromFile(source: FileSource, height: number, width: number): Promise<Image>

Загрузить PNG изображение из файла.

Parameters

source

height

number

width

number
Returns
Promise<Image>
loadSVGFromAsset(source: AssetSource): Promise<Image>

Загрузить SVG изображение из assets.

Parameters

source

Returns
Promise<Image>
loadSVGFromByteData(data: ByteDataLike): Image

Загрузить SVG изображение из бинарных данных.

Parameters
loadSVGFromFile(source: FileSource): Promise<Image>

Загрузить SVG изображение из файла.

Parameters

source

Returns
Promise<Image>

IncompleteTextHandler​

Предложено автодополнение для введенного пользователем текста.

new IncompleteTextHandler()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

queryText​

string

Нужно подставить в строку поиска этот текст и дать пользователю продолжить вводить запрос.

searchQuery​

Сформированный запрос для поиска по query_text.

IndoorBuilding​

Здание с этажными планами.

new IndoorBuilding()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
linkedWith(other: IndoorBuilding): boolean

Признак того, что текущее здание и other связаны.

Несколько зданий с этажными планами могут быть связаны между собой. Группа связанных зданий ведёт себя как единое целое:

  • метод levels() выдаёт объединённый список этажей по всей группе;
  • активный режим отображения меняется согласованно у всей группы.
Parameters

other

Returns
boolean
Properties

activeLevelIndex​

bigint

Порядковый индекс активного этажа в levels.

activeLevelIndexChannel​

Порядковый индекс активного этажа в levels.

defaultLevelIndex​

bigint

Индекс этажа по умолчанию.

id​

Идентификатор здания с этажными планами.

levels​

Информация обо всех этажах.

mode​

Активный режим. Если ActiveLevelMode, то index указывает порядковый индекс активного этажа в levels. Если OverviewMode, значит, активен обзорный вид на здание.

modeChannel​

Активный режим. Если ActiveLevelMode, то index указывает порядковый индекс активного этажа в levels. Если OverviewMode, значит, активен обзорный вид на здание.

IndoorControlModel​

Модель элемента управления этажами.

new IndoorControlModel(map: Map)
Parameters
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
isLevelMarked(index: bigint): boolean

Нужно ли отображать пометку у этажа с указанным индексом.

Parameters

index

bigint
Returns
boolean
Properties

activeLevelIndex​

bigint|null

Индекс активного этажа.

activeLevelIndexChannel​

Индекс активного этажа.

levelNames​

string[]

Названия этажей. Пусто, если на карте не отображается здание с этажными планами.

levelNamesChannel​

Названия этажей. Пусто, если на карте не отображается здание с этажными планами.

markedLevels​

Этажи, на которых отображаются пометки.

IndoorManager​

Класс для получения текущего здания с этажными планами.

new IndoorManager()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
setIndoorState(newState: IndoorManagerState): void

Переключение включенности/выключенности менеджера этажных планов

Parameters

newState

Returns
void
Properties

focusedBuilding​

Получение текущего здания с этажными планами.

focusedBuildingChannel​

Получение текущего здания с этажными планами.

InputEvent​

Событие пользовательского ввода.

Extends: Event
new InputEvent()
Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

timestamp​

Получение времени регистрации события ввода.

ItemMarkerInfo​

Идентификатор объекта и его координаты.

new ItemMarkerInfo()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

floorInfo​

geoPoint​

objectId​

rubricIds​

title​

string|null

tradeLicense​

Для получения данной информации запросите дополнительную настройку ключа.

LocaleManager​

Менеджер региональных настроек приложения.

new LocaleManager()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
overrideLocales(locales: Locale[]): void

Установка списка локалей приложения

Parameters

locales

Returns
void
instance(context: Context): LocaleManager

Интерфейс управления локалями приложения.

Parameters

context

Returns
Properties

locales​

Локали приложения, если заданы, иначе - локали, заданные пользователем в ОС.

localesChannel​

Локали приложения, если заданы, иначе - локали, заданные пользователем в ОС.

systemLocales​

Получение локалей, предоставляемых ОС.

Локали ОС в порядке, заданном пользователем (в порядке от более приоритетной к менее приоритетной).

systemLocalesChannel​

Получение локалей, предоставляемых ОС.

Локали ОС в порядке, заданном пользователем (в порядке от более приоритетной к менее приоритетной).

LocationAvailableNotifier​

Интерфейс для реализации функционала обратного вызова, который оповещает о доступности источника геопозиции. Источник геопозиции считается доступным, если он в состоянии отслеживать текущую геопозицию и оповещать об ее изменении.

new LocationAvailableNotifier()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
send(available: boolean): void
Parameters

available

boolean
Returns
void

LocationNotifier​

Интерфейс для реализации функционала обратного вызова, который возвращает измеренный платформой вектор геопозиций. Геопозиции должны быть отсортированы в порядке от старой к новой, т.е. в конце массива должна храниться самая свежая геопозиция. В случае, если ОС пришлет пустой список геопозиций, его нужно пробросить в виде пустого вектора.

new LocationNotifier()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
send(locations: Location[]): void
Parameters

locations

Returns
void

LocationService​

Класс для работы с установленным при инициализации SDK источником геопозиции.

new LocationService(context: Context)
Parameters
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
onPermissionGranted(): void

Метод необходимо вызвать после получения разрешений на использование геопозиции.

Этот метод актуален только для источника геопозиции по умолчанию.

Returns
void
withDesiredAccuracy(context: Context, desiredAccuracy: DesiredAccuracy): LocationService
Parameters

context

desiredAccuracy

Returns
Properties

lastLocation​

Канал, который оповещает об изменении геопозиции.

Возвращаемая в канале геопозиция может быть недостоверной.

Если API платформы не предоставляет аналогичный по функциональности метод, то в канале всегда будет null.

lastLocationChannel​

Канал, который оповещает об изменении геопозиции.

Возвращаемая в канале геопозиция может быть недостоверной.

Если API платформы не предоставляет аналогичный по функциональности метод, то в канале всегда будет null.

Map​

Карта.

new Map()
Returns
Methods
addSource(source: Source): void

Добавление источника данных на карту.

Происходит асинхронно. Метод может вызываться из любого потока, потокобезопасен.

Parameters

source

Returns
void
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
getRenderedObjects(centerPoint: ScreenPoint, radius?: ScreenDistance): Future<RenderedObjectInfo[]>

Получение отображаемых объектов карты, проецирующихся на окружность на экране.

Parameters

centerPoint

центр окружности.

radius?

радиус окружности. Default: new ScreenDistance({ value: 1.0 })

Список объектов формируется в порядке отрисовки от поздних к ранним.

Returns
removeSource(source: Source): void

Удаление источника данных из карты.

Происходит асинхронно. Метод может вызываться из любого потока, потокобезопасен.

Parameters

source

Returns
void
resetFontIconSizeMultiplier(): void

Сбросить множитель размера для иконок.

Returns
void
sublayerAttributes(sublayerName: string): Attributes

Получение атрибутов подслоя.

Parameters

sublayerName

string

Название подслоя.

Полученные атрибуты содержат только добавленные туда ранее (явно).

Returns
Properties

appearance​

Текущий внешний вид карты.

attributes​

Получение атрибутов.

должны быть указаны свойства: "theme"="day|night" "navigatorOn"="true|false"

TODO: стилевые свойства для пробок

camera​

Получение камеры.

dataLoadingState​

Нотификация о состоянии загружаемых в карту данных.

При слежении за позицией камеры состояние карты всегда будет MapDataLoadingState::Loading.

dataLoadingStateChannel​

Нотификация о состоянии загружаемых в карту данных.

При слежении за позицией камеры состояние карты всегда будет MapDataLoadingState::Loading.

fontIconSizeMultiplier​

number

Множитель размера иконок и шрифтов, полученный из приложения.

Размер иконок и шрифтов задаётся в логических пикселях (см. LogicalPixel) и умножается на множитель размера шрифтов и иконок.

fontIconSizeMultiplierChannel​

Множитель размера иконок и шрифтов, полученный из приложения.

Размер иконок и шрифтов задаётся в логических пикселях (см. LogicalPixel) и умножается на множитель размера шрифтов и иконок.

graphicsPreset​

Получение режима графики. В случае null используется рекомендуемый режим. Если определить рекомендуемый режим не удалось, то используется Normal.

graphicsPresetChannel​

Получение режима графики. В случае null используется рекомендуемый режим. Если определить рекомендуемый режим не удалось, то используется Normal.

graphicsPresetHint​

Получение рекомендуемого режима графики для данного устройства.

graphicsPresetHintChannel​

Получение рекомендуемого режима графики для данного устройства.

id​

Идентификатор экземпляра карты, уникальный в рамках процесса.

indoorManager​

Получение менеджера этажных планов.

interactive​

boolean

Интерактивность карты. Под интерактивностью понимается наличие у пользователя возможности взаимодействия с картой. При отключении интерактивности карта перестанет реагировать на события ввода, пришедшие от пользователя. Также перестанут работать контролы для работы с картой (приближения и перехода к текущему положению). При этом остаётся возможность работать с картой через set_position/move. При переходе в неинтерактивное состояние незавершённые жесты будут сброшены. По умолчанию карта интерактивна (interactive == true).

функция может быть вызвана из любого потока.

interactiveChannel​

Интерактивность карты. Под интерактивностью понимается наличие у пользователя возможности взаимодействия с картой. При отключении интерактивности карта перестанет реагировать на события ввода, пришедшие от пользователя. Также перестанут работать контролы для работы с картой (приближения и перехода к текущему положению). При этом остаётся возможность работать с картой через set_position/move. При переходе в неинтерактивное состояние незавершённые жесты будут сброшены. По умолчанию карта интерактивна (interactive == true).

функция может быть вызвана из любого потока.

mapVisibilityState​

mapVisibilityStateChannel​

sources​

Получение источников данных карты.

Происходит асинхронно. Метод может вызываться из любого потока, потокобезопасен.

style​

Получение текущих стилей карты.

styleChannel​

Получение текущих стилей карты.

theme​

Текущая тема, установленная в соответствии с appearance.

themeChannel​

Текущая тема, установленная в соответствии с appearance.

universeDrawingMode​

Режим отображения Universe.

universeDrawingModeChannel​

Режим отображения Universe.

MapController​

Готовая к показу карта вместе с рендерером и распознавателем жестов.

new MapController()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
create(context: Context, options: MapControllerOptions): Future<MapController>

Создаёт карту с параметрами из options.

Parameters

context

контекст SDK. Должен быть валиден на время создания карты.

options

параметры начального состояния карты.

Returns
Future<MapController>

future с готовым MapController либо с ошибкой создания.

Properties

gestureRecognizer​

Распознаватель жестов карты.

map​

Карта, управляемая этим контроллером.

renderedObjectObserver​

Наблюдатель за объектами карты.

renderer​

Рендерер карты.

MapGestureRecognizer​

Принимает информацию о нажатиях и преобразует их в жесты карты. Обработка происходит в два этапа:

  • Добавляется несколько точек - add_touch_point
  • Точки обрабатываются - process_touch_event
new MapGestureRecognizer()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean

MapObject​

Объект на карте.

new MapObject()
Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

userData​

object|null

Произвольные пользовательские данные, прикрепленные к объекту.

MapObjectManager​

new MapObjectManager(map: Map, layerId?: string | null)

Создать IMapObjectManager.

Parameters

map

layerId?

string|null

ID слоя в стиле типа "Динамический объект". Создаваемые объекты будут размещены на этом слое, тем самым можно задать их порядок относительно других слоев. Если не задан, объекты размещаются поверх остальных слоев. Default: null

Returns
Methods
addObject(item: SimpleMapObject): void

Добавить объект.

Parameters

item

Returns
void
addObjects(objects: SimpleMapObject[]): void

Добавить объекты.

Parameters

objects

Returns
void
clusteringObjects(position: CameraPosition): MapObject[]

Получить список объектов, участвующих в кластеризации при переданной позиции камеры. В списке будут присутствовать как кластеры, так и маркеры.

Parameters
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
removeAll(): void
Returns
void
removeAndAddObjects(objectsToRemove: SimpleMapObject[], objectsToAdd: SimpleMapObject[]): void

Удалить и добавить объекты.

Parameters

objectsToRemove

objectsToAdd

Returns
void
removeObject(item: SimpleMapObject): void

Удалить объект.

Parameters

item

Returns
void
removeObjects(objects: SimpleMapObject[]): void

Удалить объекты.

Parameters

objects

Returns
void
withClustering(map: Map, logicalPixel: LogicalPixel, maxZoom: Zoom, clusterRenderer: SimpleClusterRenderer, minZoom?: Zoom, layerId?: string | null): MapObjectManager

Создать IMapObjectManager с кластеризацией данных. Кластеризуются только IMarker объекты.

Parameters

map

logicalPixel

Минимально возможное расстояние на экране между точками привязки маркеров на уровнях, где работает кластеризация.

maxZoom

Уровень, начиная с которого видны все маркеры.

clusterRenderer

Интерфейс для задания параметров отображения кластера.

minZoom?

Уровень, начиная с которого формируются кластеры. Default: new Zoom({ value: 0.0 })

layerId?

string|null

ID слоя в стиле типа "Динамический объект". Создаваемые объекты будут размещены на этом слое, тем самым можно задать их порядок относительно других слоев. Если не задан, объекты размещаются поверх остальных слоев. Default: null

Returns
withGeneralization(map: Map, logicalPixel: LogicalPixel, maxZoom: Zoom, minZoom?: Zoom, layerId?: string | null): MapObjectManager

Создать IMapObjectManager с генерализацией данных. Генерализуются только IMarker объекты.

Parameters

map

logicalPixel

Минимально возможное расстояние на экране между точками привязки маркеров на уровнях, где работает генерализация.

maxZoom

Уровень, начиная с которого видны все маркеры.

minZoom?

Уровень, начиная с которого работает генерализация. Default: new Zoom({ value: 0.0 })

layerId?

string|null

ID слоя в стиле типа "Динамический объект". Создаваемые объекты будут размещены на этом слое, тем самым можно задать их порядок относительно других слоев. Если не задан, объекты размещаются поверх остальных слоев. Default: null

Returns
Properties

isVisible​

boolean

Переопределение видимости всех объектов, добавленных в экземпляр менеджера. Значение false здесь имеет приоритет над видимостью отдельного объекта.

MapRenderedObjectObserver​

Наблюдатель за взаимодействиями с рендеренными объектами на карте.

Этот интерфейс предоставляет каналы для прослушивания событий взаимодействия пользователя с рендеренными объектами на карте, такими как касания и долгие нажатия.

new MapRenderedObjectObserver()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

objectLongTouched​

Канал, который возвращает список RenderedObjectInfo при долгом нажатии пользователем на рендеренный объект. Может быть пустым, при долгом нажатии мимо объекта.

objectTapped​

Канал, который возвращает список RenderedObjectInfo при касании пользователем рендеренного объекта. Может быть пустым, при тапе мимо объекта.

MapRenderer​

Создание этого объекта приводит к началу рисования карты.

new MapRenderer()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
setMaxFps(maxFps: Fps | null, powerSavingMaxFps: Fps | null): void
Parameters

maxFps

Fps|null

powerSavingMaxFps

Fps|null
Returns
void
takeSnapshot(copyrightAlign: Alignment): Future<ImageData>
Parameters

copyrightAlign

Returns
takeSnapshotAsDataUri(copyrightAlign: Alignment): Future<string | null>

Делает снимок карты и сразу конвертирует его в data:-URI, готовый для использования в <Image source={{ uri }} />.

SDK может вернуть снимок в формате PNG или в виде сырых пикселей RGBA8888 — оба случая обрабатываются здесь, вызывающему коду не нужно знать о формате снимка. Результат — Future, как и у takeSnapshot: его нужно дождаться через onComplete и освободить через destroy.

Parameters

copyrightAlign

Returns
Future<string | null>

null в колбэке onComplete, если формат снимка не поддерживается.

Properties

fps​

fpsChannel​

maxFps​

Fps|null

powerSavingMaxFps​

Fps|null

MapRotationBeginEvent​

Событие начала вращения карты вокруг точки.

Extends: Event
new MapRotationBeginEvent(direction: MapRotationDirection)
Parameters
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

direction​

Направление вращения карты.

MapRotationEndEvent​

Событие окончания вращения карты вокруг точки.

Extends: Event
new MapRotationEndEvent()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean

MapScalingBeginEvent​

Событие начала изменения масштаба.

Extends: Event
new MapScalingBeginEvent(direction: MapScalingDirection)
Parameters
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

direction​

Направление изменения масштаба карты.

MapScalingEndEvent​

Событие окончания изменения масштаба.

Extends: Event
new MapScalingEndEvent()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean

MapShiftBeginEvent​

Событие начала сдвига карты.

Extends: Event
new MapShiftBeginEvent(direction: MapShiftDirection)
Parameters
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

direction​

Направление смещения карты.

MapShiftEndEvent​

Событие окончания смещения карты.

Extends: Event
new MapShiftEndEvent()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean

Marker​

Точечная отметка на карте, представляющая интерес для пользователя.

new Marker(options: MarkerOptions)
Parameters

options

Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

anchor​

Получение точки привязки иконки маркера.

animatedAppearance​

boolean

Анимировать ли появление.

bounds​

Прямоугольник минимального размера, содержащий геометрию.

icon​

Image|null

Получение иконки маркера.

iconAnimationMode​

Получение режима анимации анимированного маркера.

iconMapDirection​

Угол поворота маркера на карте относительно направления на север, по часовой стрелке.

iconOpacity​

Получение прозрачности иконки маркера.

iconWidth​

Получение целевой ширины маркера, используемой для масштабирования.

isDraggable​

boolean

Получение флага перемещаемости маркера.

isVisible​

boolean

labelingPriority​

Получение приоритета лейблинга маркера.

levelId​

LevelId|null

Получение привязки объекта к этажу в здании.

position​

Получение местоположения маркера.

suppressOnOverlap​

boolean

Скрывать ли иконку при наложении с другими объектами (маркеры, подписи других объектов).

text​

string

Получение подписи маркера.

textStyle​

Получение стиля подписи маркера.

userData​

object|null

Произвольные пользовательские данные, прикрепленные к объекту.

zIndex​

Получение уровня отрисовки объекта.

ModelData​

Данные модели.

Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean

ModelLoader​

Класс для загрузки объемных моделей.

new ModelLoader(sdkContext: Context)
Parameters

sdkContext

Returns
Methods
loadFromAsset(source: AssetSource): Promise<ModelData>

Загрузить модель из assets.

Parameters

source

Returns
Promise<ModelData>
loadFromByteData(data: ByteDataLike): ModelData

Загрузить модель из бинарных данных.

Parameters
loadFromFile(source: FileSource): Promise<ModelData>

Загрузить модель из файла.

Parameters

source

Returns
Promise<ModelData>

ModelMapObject​

Модель на карте.

new ModelMapObject(options: ModelMapObjectOptions)
Parameters
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

animationSettings​

Настройки анимации.

bounds​

Прямоугольник минимального размера, содержащий геометрию.

isVisible​

boolean

levelId​

LevelId|null

Получение привязки объекта к этажу в здании.

mapDirection​

Угол поворота модели на карте относительно направления на север, по часовой стрелке.

modelData​

Данные модели.

opacity​

Прозрачность модели.

position​

Местоположения модели.

size​

Размер модели.

userData​

object|null

Произвольные пользовательские данные, прикрепленные к объекту.

zIndex​

Получение уровня отрисовки объекта.

MultiTouchGestureSettings​

Настройки жеста касания несколькими пальцами.

new MultiTouchGestureSettings()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

recognizeSettings​

Настройки распознавания касания несколькими пальцами.

MyLocationControlModel​

Модель контрола перелета к местоположению пользователя. Контрол состоит из кнопки, при нажатии на которую камера перелетает к местоположению пользователя. Если местоположение не определено, ничего не происходит. Методы объекта необходимо вызывать на одном потоке.

new MyLocationControlModel(map: Map)
Parameters
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
onClicked(): void
Returns
void
Properties

followState​

Состояние слежения камеры за текущим местоположением пользователя.

followStateChannel​

Состояние слежения камеры за текущим местоположением пользователя.

isEnabled​

boolean

Состояние элемента перелета к местоположению пользователя.

isEnabledChannel​

Состояние элемента перелета к местоположению пользователя.

locationQuality​

Качество определения текущего местоположения.

locationQualityChannel​

Качество определения текущего местоположения.

MyLocationMapObject​

Маркер геопозиции.

Extends: MapObject
new MyLocationMapObject()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
setModelData(data: ModelData | null): void

Установить данные модели.

Parameters

data

Returns
void
Properties

animationSettings​

Получение настроек анимации для чтения и изменения.

objectAttributes​

Получение свойств объекта карты для чтения и изменения.

userData​

object|null

Произвольные пользовательские данные, прикрепленные к объекту.

MyLocationMapObjectSource​

Источник, содержащий маркер геопозиции.

Extends: Source
new MyLocationMapObjectSource(context: Context, controllerSettings?: MyLocationControllerSettings, markerType?: MyLocationMapObjectMarkerType)

Создать источник маркера геопозиции.

Parameters

context

controllerSettings?

Default: new MyLocationControllerSettings({ })

markerType?

Default: MyLocationMapObjectMarkerType.Model

Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

item​

Получить маркер геопозиции.

NewValuesNotifier​

Интерфейс объекта, который сообщает о том, что есть изменения в каком-либо из параметров.

new NewValuesNotifier()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
sendNotification(): void

Необходимо вызывать, чтобы сообщить об обновлении параметров.

Returns
void

PackedMapState​

Сериализованное состояние карты.

new PackedMapState()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
toBytes(): number[]

Представление состояния карты в виде последовательности байтов.

Returns
number[]
fromBytes(data: number[]): PackedMapState

Получение состояния карты.

Parameters

data

number[]

Состояние карты в виде последовательности байтов.

Returns
PackedMapState

Сериализованное состояние карты.

fromMap(map: Map): PackedMapState

Получение состояния карты.

Parameters

map

Карта, состояние которой необходимо получить.

Returns
PackedMapState

Сериализованное состояние карты.

of(position: CameraPosition, showTraffic: boolean, behaviour: CameraBehaviour): PackedMapState

Получение состояния карты.

Parameters

position

Позиция камеры.

showTraffic

boolean

Состояние отображения пробок на карте.

behaviour

Режим слежения камеры.

Returns
PackedMapState

Сериализованное состояние карты.

Properties

cameraBehaviour​

Получения режима слежения камеры.

cameraPosition​

Получение позиции камеры.

showTraffic​

boolean

Получение состояния отображения пробок на карте.

PackedSearchQuery​

Вспомогательный объект для сериализации и десериализации поискового запроса.

new PackedSearchQuery()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
toBytes(): number[]
Returns
number[]
toSearchQuery(): SearchQuery
fromBytes(data: number[]): PackedSearchQuery

Десериализация запроса поиска.

Parameters

data

number[]
Returns
fromSearchQuery(searchQuery: SearchQuery): PackedSearchQuery
Parameters
Properties

allowedResultTypes​

Ограничение по возвращаемым поиском типам объектов.

areaOfInterest​

GeoRect|null

Прямоугольная область интереса.

buildingIds​

Идентификаторы зданий.

directoryFilter​

Информация об активных фильтрах.

geometryRestriction​

Геометрия, ограничивающая область поиска.

locale​

Locale|null

Локаль поискового запроса.

objectIds​

Идентификаторы объектов.

orgIds​

Идентификаторы организаций.

pageSize​

number

Размер страницы выдачи.

queryText​

string

Текст запроса. Для некоторых запросов (например, раскрытие рубрики из suggest'а) текст отсутствует, т.к. в запросе хранятся идентификаторы, и поведение отличается от поиска по тексту элемента suggest'а.

radius​

Meter|null

Радиус поиска в метрах.

rubricIds​

Идентификаторы рубрик.

searchNearby​

boolean

Указание поисковому движку использовать режим поиска рядом с пользователем. Сильно повышает значимость расстояния от пользователя.

sortingType​

Тип сортировки результатов.

territoryOfInterest​

Слабое ограничение области поиска объектов: штраф за непопадание вместо строгого отбрасывания.

Page​

Страница результатов поиска.

new Page()
Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
fetchNextPage(): Future<Page | null>

Получить следующую страницу результатов.

Returns
Future<Page | null>

future, резолвящаяся в ненулевой указатель на следующую страницу, если страница успешно получена future, резолвящаяся в нулевой указатель, если следующая страница отсутствует exceptional future, если произошла ошибка при получении страницы

fetchPrevPage(): Future<Page | null>

Получить предыдущую страницу результатов.

Returns
Future<Page | null>

future, резолвящаяся в ненулевой указатель на предыдущую страницу, если страница успешно получена future, резолвящаяся в нулевой указатель, если предыдущая страница отсутствует exceptional future, если произошла ошибка при получении страницы

Properties

items​

Непустой набор объектов справочника этой страницы.

ParkingControlModel​

Модель контрола парковок.

Этот интерфейс является потокобезопасным.

new ParkingControlModel(map: Map)

Функция создания модели элемента управления парковками.

Parameters

map

карта.

Returns
ParkingControlModel

Модель элемента управления видимостью парковок для карты.

Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
toggleParkingsVisibility(): void

Действие при нажатии на контрол. Переключает видимость парковок на карте.

Returns
void
Properties

isEnabled​

boolean

Состояние элемента управления видимостью парковок. true, если парковки видны.

isEnabledChannel​

Состояние элемента управления видимостью парковок. true, если парковки видны.

PerformSearchHandler​

Предложено поискать определенный набор объектов.

new PerformSearchHandler()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

searchQuery​

Запрос для прогона через поисковик.

PointGeometry​

Точка.

Extends: Geometry
new PointGeometry()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
intersects(geometry: Geometry): boolean

Функция intersects позволяет определить, имеет ли данная геометрия пересечение с другим объектом геометрии

Parameters

geometry

объект геометрии для проверки пересечения При вычислении пересечения с IPointGeometry высота (elevation) игнорируется

Returns
boolean
fromGeoPoint(point: GeoPoint): PointGeometry
Parameters
fromGeoPointWithElevation(point: GeoPointWithElevation): PointGeometry
Parameters
Properties

bounds​

Прямоугольник минимального размера, содержащий геометрию.

kind​

maxPoint​

Максимальная точка ограничивающего прямоугольника.

minPoint​

Минимальнная точка ограничивающего прямоугольника.

point​

Polygon​

Полигон на карте.

new Polygon(options: PolygonOptions)

Создание полигона на основе параметров.

Parameters

options

Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

bounds​

Прямоугольник минимального размера, содержащий геометрию.

color​

contours​

dashedPolygonOptions​

Получение параметров пунктирного контура полигона.

elevation​

isVisible​

boolean

levelId​

LevelId|null

Получение привязки объекта к этажу в здании.

strokeColor​

strokeWidth​

userData​

object|null

Произвольные пользовательские данные, прикрепленные к объекту.

zIndex​

Получение уровня отрисовки объекта.

PolygonGeometry​

Полигон.

Extends: Geometry
new PolygonGeometry(contours: GeoPoint[][])
Parameters
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
intersects(geometry: Geometry): boolean

Функция intersects позволяет определить, имеет ли данная геометрия пересечение с другим объектом геометрии

Parameters

geometry

объект геометрии для проверки пересечения При вычислении пересечения с IPointGeometry высота (elevation) игнорируется

Returns
boolean
Properties

bounds​

Прямоугольник минимального размера, содержащий геометрию.

contours​

elevation​

kind​

maxPoint​

Максимальная точка ограничивающего прямоугольника.

minPoint​

Минимальнная точка ограничивающего прямоугольника.

Polyline​

Ломаная линия на карте.

new Polyline(options: PolylineOptions)
Parameters
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

bounds​

Прямоугольник минимального размера, содержащий геометрию.

color​

dashedPolylineOptions​

Получение параметров пунктирной полилинии.

elevation​

erasedPart​

number

gradientPolylineOptions​

Получение параметров градиентной полилинии.

isVisible​

boolean

levelId​

LevelId|null

Получение привязки объекта к этажу в здании.

points​

userData​

object|null

Произвольные пользовательские данные, прикрепленные к объекту.

width​

zIndex​

Получение уровня отрисовки объекта.

PolylineGeometry​

Ломаная линия.

Extends: Geometry
new PolylineGeometry(points: GeoPoint[])
Parameters
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
intersects(geometry: Geometry): boolean

Функция intersects позволяет определить, имеет ли данная геометрия пересечение с другим объектом геометрии

Parameters

geometry

объект геометрии для проверки пересечения При вычислении пересечения с IPointGeometry высота (elevation) игнорируется

Returns
boolean
Properties

bounds​

Прямоугольник минимального размера, содержащий геометрию.

elevation​

kind​

maxPoint​

Максимальная точка ограничивающего прямоугольника.

minPoint​

Минимальнная точка ограничивающего прямоугольника.

points​

Projection​

Проекция.

Используется сферическая проекция Меркатора (EPSG:3857), зацикленная по долготе. Отображаемые данные ограничены по широте от -85.06° до 85.06°.

new Projection()
Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
distanceOnMap(fromPoint: ScreenPoint, toPoint: ScreenPoint): Meter | null

Вычисление расстояния между точками на карте, соответствующими указанным точкам на экране, в метрах.

Функция возвращает пустое значение, если одна или обе указанных точки экрана находятся за пределами проекции карты.

Parameters

fromPoint

toPoint

Returns
Meternull
distanceOnScreen(fromGeoPoint: GeoPoint, toGeoPoint: GeoPoint): LogicalPixel | null

Вычисление расстояния между точками на экране, соответствующими указанным точкам на карте, в пикселях.

Функция возвращает пустое значение если одна или обе точки на карте:

  • имеют невалидное значение (latitude лежит вне диапазона [-90; 90] или longitude лежит вне диапазона [-180; 180]).
  • находятся выше плоскости проекции карты на экран.
  • находятся слишком далеко за пределами экрана и возникает переполнение типа.
Parameters

fromGeoPoint

toGeoPoint

Returns
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
mapToScreenWithGeoPoint(point: GeoPoint): ScreenPoint | null

Вычисление точки экрана, соответствующей указанной точке карты.

Функция возвращает пустое значение:

  • point имеет невалидное значение (latitude лежит вне диапазона [-90; 90] или longitude лежит вне диапазона [-180; 180]).
  • если указанная точка карты находится выше плоскости проекции карты на экран.
  • если указанная точка карты находится слишком далеко за пределами экрана и возникает переполнение типа.
Parameters

point

Returns
mapToScreenWithGeoPointWithElevation(point: GeoPointWithElevation): ScreenPoint | null

Вычисление точки экрана, соответствующей указанной точке карты с высотой.

Функция возвращает пустое значение:

  • point имеет невалидное значение (latitude лежит вне диапазона [-90; 90], longitude лежит вне диапазона [-180; 180] или elevation отрицателен).
  • если указанная точка карты находится выше плоскости проекции карты на экран.
  • если указанная точка карты находится слишком далеко за пределами экрана и возникает переполнение типа.
Parameters
screenToMap(point: ScreenPoint): GeoPoint | null

Вычисление точки карты в указанной точке экрана.

Функция возвращает пустое значение, если указанная точка экрана за пределами проекции карты.

Parameters

point

Returns
screenToMapClipped(point: ScreenPoint): GeoPoint

Вычисление ближайшей точки карты к проекции указанной точки экрана.

Parameters

RangeWidget​

Виджет для представления непрерывного или дискретного набора упорядоченных значений.

Extends: Widget
new RangeWidget()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
setValues(min: number, max: number): void

Установка текущих выбранных значений.

Parameters

min

number

текущее минимальное значение.

max

number

текущее максимальное значение.

Returns
void
Properties

caption​

string|null

Получение заголовка виджета. Может отсутствовать.

filters​

Получение списка фильтров, описывающих текущее состояние виджета. Может быть использован при формировании поискового запроса.

range​

Получение набора упорядоченных значений.

type​

Получение типа виджета.

RasterTileSource​

Источник, получающий растровые тайлы.

Extends: Source
new RasterTileSource(context: Context, sublayerName: string, sourceTemplate: RasterUrlTemplate)

Создание источника, получающего растровые тайлы.

Parameters

context

контекст.

sublayerName

string

имя, которое будет использовано при генерации объектов. Это имя должно быть указано в стилях в условии filter слоя типа raster для атрибута db_sublayer. Пример: ["match", ["get", "db_sublayer"], ["NAME"], true, false] Подробнее см. спецификацию: https://docs.2gis.com/en/mapgl/stylespecification

sourceTemplate

Шаблон для запроса тайлов.

Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
setOpacity(opacity: Opacity): void

Установка значения прозрачности растрового тайла.

Parameters

opacity

Returns
void

Remover​

Объект для удаления пользовательского контента.

new Remover()
Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
remove(): Future<ActionResult>

Удаление контента.

действие доступно для контента, автором которого является пользователь.

RoadEvent​

Дорожное событие.

new RoadEvent()
Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
photos(): Future<RoadEventPhoto[]>

Фотографии события.

Properties

author​

Информация о пользователе, добавившем событие.

availableActions​

Список доступных действий с событием.

cameraInfo​

Информация о камере.

Доступна только для событий типа "Camera".

description​

string

Пользовательское описание дорожного события.

elevation​

Высота дорожного события.

id​

string

Идентификатор события.

lanes​

Затронутые событием полосы.

На текущий момент могут быть проставлены только у пользовательских событий.

location​

Координаты события.

name​

string

Локализованное название события.

remover​

Remover|null

Получение объекта для удаления события.

schedule​

Расписание.

На текущий момент доступно только для перекрытий, и даже для них может отсутствовать.

timestamp​

Временная метка создания события.

type​

Тип события.

RoadEventAction​

Действие события.

new RoadEventAction()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
reset(): Future<ActionResult>

Отмена действия (например, сброс отметки "нравится", сброс подтверждения события).

Есть действия, противоположные друг другу, например, "нравится" и "не нравится". Если для события доступны оба действия, вызов метода не вызывает применение противоположного действия.

set(): Future<ActionResult>

Применение действия (например, добавление отметки "нравится", подтверждение события).

Есть действия, противоположные друг другу, например, "нравится" и "не нравится". Если для события доступны оба действия, вызов метода сбрасывает применение противоположного - невозможно одновременно поставить "нравится" и "не нравится".

Properties

info​

Информация о действии.

infoChannel​

Информация о действии.

name​

string

Локализованное название действия.

type​

Тип действия.

RoadEventManager​

Объект для создания транспортных событий.

new RoadEventManager()
Methods
createAccident(location: GeoPoint, lanes: EnumSet<Lane>, description: string): Future<AddEventResult>

Создание события "ДТП".

Parameters

location

Местоположение события.

lanes

Полосы дороги, затрагиваемые событием.

description

string

Пользовательское описание события.

Returns
createCamera(location: GeoPoint, description: string): Future<AddEventResult>

Создание события "Камера".

Parameters

location

Местоположение события.

description

string

Пользовательское описание события.

Returns
createComment(location: GeoPoint, description: string): Future<AddEventResult>

Создание события "Комментарий".

Parameters

location

Местоположение события.

description

string

Пользовательское описание события.

Returns
createOther(location: GeoPoint, lanes: EnumSet<Lane>, description: string): Future<AddEventResult>

Создание события "Другое".

Parameters

location

Местоположение события.

lanes

Полосы дороги, затрагиваемые событием.

description

string

Пользовательское описание события.

Returns
createRoadRestriction(location: GeoPoint, description: string): Future<AddEventResult>

Создание события "Перекрытие дорожного движения".

Parameters

location

Местоположение события.

description

string

Пользовательское описание события.

Returns
createRoadWorks(location: GeoPoint, lanes: EnumSet<Lane>, description: string): Future<AddEventResult>

Создание события "Дорожные работы".

Parameters

location

Местоположение события.

lanes

Полосы дороги, затрагиваемые событием.

description

string

Пользовательское описание события.

Returns
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
instance(context: Context): RoadEventManager

Получение объекта для создания дорожных событий.

Parameters

RoadEventMapObject​

Объект карты "Дорожное событие".

Extends: MapObject
new RoadEventMapObject()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

animationSettings​

Получение настроек анимации дорожных событий для чтения и изменения.

event​

Получение дорожного события.

id​

userData​

object|null

Произвольные пользовательские данные, прикрепленные к объекту.

RoadEventPhoto​

Фотография дорожного события.

new RoadEventPhoto()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
previewUrl(desiredSize: ScreenSize): string

URL превью фотографии.

Parameters

desiredSize

Returns
string
report(): Future<ActionResult>

Отправка жалобы на фотографию.

жалоба на свою фотографию ни к чему не приведёт.

Properties

author​

Информация о пользователе, добавившем фотографию.

photoUrl​

string

URL полноразмерной фотографии.

remover​

Remover|null

Получение объекта для удаления фотографии.

timestamp​

Временная метка.

RoadEventSource​

Интерфейс класса, управляющего отображением дорожных событий (tUGC) на карте.

Extends: Source
new RoadEventSource(context: Context)

Создание источника, отображающего дорожные события на карте.

Parameters
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
setHighlighted(directoryObjectIds: DgisObjectId[], highlighted: boolean): void

Установка или снятие выделения дорожных событий.

добавляет событию атрибут "selected", который можно использовать в стилях.

Parameters

directoryObjectIds

Идентификаторы изменяемых событий. Можно получить из RoadEventMapObject.

highlighted

boolean

Установка или снятие выделения.

Returns
void
Properties

highlightedObjects​

Получение списка идентификаторов выделенных дорожных событий.

highlightedObjectsChannel​

Получение списка идентификаторов выделенных дорожных событий.

roadEventFilter​

RotateMapToNorthEvent​

Событие поворота карты на север.

Extends: Event
new RotateMapToNorthEvent()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean

RotationGestureSettings​

Настройки жеста вращения.

new RotationGestureSettings()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

kinematicSettings​

Настройки кинематики вращения.

recognizeSettings​

Настройки распознавания вращения.

rotationCenter​

Точка, относительно которой производится вращение карты.

ScaleMapEvent​

Событие изменения масштаба карты.

Extends: Event
new ScaleMapEvent(zoomDelta: number, scalingCenter?: ScreenPoint | null)

Конструктор события изменения масштаба.

Parameters

zoomDelta

number

Величина, на которую изменится текущее значение масштаба.

scalingCenter?

Точка на экране, относительно которой масштабируется карта. Если точка не задана, то масштабирование происходит относительно точки позиции карты. Default: null

Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

scalingCenter​

Точка на экране, относительно которой масштабируется карта.

zoomDelta​

number

Величина, на которую изменится текущее значение масштаба.

ScalingGestureSettings​

Настройки жеста масштабирования.

new ScalingGestureSettings()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

kinematicSettings​

Настройки кинематики масштабирования.

recognizeSettings​

Настройки распознавания масштабирования.

scalingCenter​

Точка, относительно которой производится масштабирование карты.

SearchCategoriesResult​

Результат запроса категорий.

new SearchCategoriesResult()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

firstPage​

Первая страница результатов запроса категорий.

total​

number

Общее количество найденных категорий.

SearchHistory​

new SearchHistory()
Methods
addItem(item: SearchHistoryItem): void

Добавляет элемент в историю поиска. В случае, если уже существовал такой же элемент, ранний дубликат удаляется.

Parameters

item

Returns
void
addItems(items: SearchHistoryItem[]): void

Добавляет список элементов в историю поиска. Считается, что порядок в списке хронологический. Все дубликаты будут убраны.

Parameters

items

Returns
void
clear(): void

Очищает историю поиска.

Returns
void
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
items(page: SearchHistoryPage): Future<SearchHistoryResult>

Возвращает страницу истории поиска. Элементы возвращаются в упорядоченном виде по времени добавления (от самых свежих до самых поздних).

Parameters
removeItem(item: SearchHistoryItem): void

Удаляет элемент из истории поиска.

Parameters

item

Returns
void
removeItems(items: SearchHistoryItem[]): void

Удаляет список элементов из истории поиска.

Parameters

items

Returns
void
setKeyStrategy(keyStrategy: SearchHistoryKeyStrategy | null): void

Устанавливает политику формирования ключей для истории поиска. Миграцию уже существующих записей, созданных с использованием другой политики key_strategy, необходимо выполнять вручную. Если параметр не задан — используется алгоритм по умолчанию.

Parameters

keyStrategy

Returns
void
instance(context: Context): SearchHistory
Parameters

context

Returns
Properties

capacity​

bigint

Получает максимальный размер истории поиска.

onHistoryChanged​

SearchHistoryResult​

Результат работы истории поиска при запросе истории.

new SearchHistoryResult()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

items​

Набор элементов истории поиска.

SearchManager​

Поисковик. Основная точка входа для справочного API.

new SearchManager()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
search(query: SearchQuery): Future<SearchResult>

Получить объекты справочника, соответствующие данному запросу.

Parameters

query

Returns
Future<SearchResult>

future, резолвящаяся в ненулевой указатель на результат поиска или exceptional future, если произошла ошибка при получении результатов поиска

searchByDirectoryObjectIds(objectIds: DgisObjectId[], locale?: Locale | null): Future<DirectoryObject[]>

Получить объекты справочника по идентификаторам с указанной локалью. Для онлайна можно передать не более 100 идентификаторов.

Parameters

objectIds

locale?

Locale|null

Default: null

Returns
Future<DirectoryObject[]>

future, резолвящаяся в список объектов справочника. Если объекты не найдены, то вернётся пустой список.

searchByIds(ids: string[], locale?: Locale | null): Future<DirectoryObject[]>

Получить объекты справочника по строковым идентификаторам с указанной локалью. Для онлайна можно передать не более 100 идентификаторов.

Parameters

ids

string[]

locale?

Locale|null

Default: null

Returns
Future<DirectoryObject[]>

future, резолвящаяся в список объектов справочника. Если объекты не найдены, то вернётся пустой список.

searchBySuggest(suggest: Suggest, searchSettings: SearchSettings): Future<SearchResult>

Получить объекты справочника, соответствующие данному саджесту.

Parameters

suggest

searchSettings

Returns
Future<SearchResult>

future, резолвящаяся в ненулевой указатель на результат поиска или exceptional future, если произошла ошибка при получении результатов поиска

searchCategories(query: CategoryQuery): Future<SearchCategoriesResult>

Получить категории, соответствующие данному запросу.

Parameters

query

Returns
Future<SearchCategoriesResult>

future, резолвящаяся в ненулевой указатель на результат получения категорий или exceptional future, если произошла ошибка при получении категорий

suggest(query: SuggestQuery): Future<SuggestResult>

Получить подсказки, соответствующие данному запросу.

Parameters

query

Returns
Future<SuggestResult>

future, резолвящаяся в ненулевой указатель на результат подбора подсказок или exceptional future, если произошла ошибка при получении подсказок

createOnlineManager(context: Context): SearchManager

Создать поисковик, работающий онлайн.

Parameters

context

Returns

SearchQuery​

Поисковый запрос.

new SearchQuery()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean

SearchQueryBuilder​

Построитель поисковых запросов. Поиск осуществляется по глобальному индексу, а также по локальным индексам сегментов, где сегмент - это некоторый кусок разбиения глобальной карты. Процедура выбора сегментов для поиска осуществляется следующими способами (по убыванию приоритета):

  1. При указании прямоугольной области интереса (set_area_of_interest), поиск ведется в некоторой ее окрестности.
  2. Если не указан вышестоящий параметр, то учитывается точка положения пользователя.

TODO: Данное условие пока не работает. Будет исправлено в ближайших релизах. 3. При упоминании в тексте запроса широко известного объекта (город, область или другой топоним) добавляется в поиск тот сегмент, в который попадает точка найденного объекта из глобального индекса. 4. Если не указано ничего из вышеперечисленного, то осуществляется поиск по глобальному индексу.

new SearchQueryBuilder()
Methods
build(): SearchQuery

Сформировать поисковый запрос.

destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
setAllowedResultTypes(allowedResultTypes: ObjectType[]): SearchQueryBuilder

Задать типы объектов, разрешенные в результате запроса.

по умолчанию все, кроме Route

Parameters

allowedResultTypes

Returns
setAreaOfInterest(rect: GeoRect | null): SearchQueryBuilder

Задать прямоугольную область интереса в географических координатах. Типичным значением является visible_rect из ICamera - объемлющий прямоугольник области просмотра.

Parameters
setBuildingIds(buildingIds: BuildingId[]): SearchQueryBuilder

Задать идентификаторы зданий для фильтрации объектов в зданиях.

Parameters
setDirectoryFilter(filter: DirectoryFilter): SearchQueryBuilder

Задать фильтрацию для поискового запроса.

Parameters
setLocale(locale: Locale | null): SearchQueryBuilder

Задать локаль для поискового запроса.

Parameters

locale

Locale|null
Returns
setOrgId(orgId: OrgId): SearchQueryBuilder

Задать фильтр по идентификаторам организаций, к которым относятся компании.

Parameters
setPageSize(pageSize: number): SearchQueryBuilder

Задать предпочитаемое количество элементов на странице результатов. Допустимы значения из диапазона [1; 50]

по умолчанию 10

Parameters

pageSize

number
Returns
setQueryText(queryText: string | null): SearchQueryBuilder

Задать текст поискового запроса.

Parameters

queryText

string|null
Returns
setRadius(radius: Meter | null): SearchQueryBuilder

Задать радиус поиска в метрах. Работает в сочетании с установленным geo_point. Радиус по умолчанию равен 250 метров. Для поискового запроса в точке ограничение от 0 до 2000. Для остальных запросов ограничение от 0 до 50000.

Parameters

radius

Meter|null
Returns
setRestrictionGeometry(restrictionGeometry: Geometry | null): SearchQueryBuilder

Задать строгое ограничение области поиска геометрией. Для GeometryKind.Point будет выставлен центр строгого ограничения для поискового запроса. Радиус по умолчанию равен 250 метров.

GeometryKind.Polyline и GeometryKind.Polygon будут установлены как полигоны. Первая и последняя точки контура не обязаны совпадать.

Геометрия типа GeometryKind.Complex будет установлена как мулитиполигон. Для GeometryKind.Point внутри GeometryKind.Complex геометрия будет преобразована в контур полигона с радиусом из set_radius.

по умолчанию ограничение отсутствует.

Parameters

restrictionGeometry

Returns
setRubricIds(rubricIds: RubricId[]): SearchQueryBuilder

Задать идентификаторы рубрик.

Parameters
setSearchNearby(searchNearby: boolean): SearchQueryBuilder

Указание поисковому движку использовать режима поиска рядом с пользователем. Сильно повышает значимость расстояния от пользователя.

Parameters

searchNearby

boolean
Returns
setSortingType(sortingType: SortingType): SearchQueryBuilder

Задать сортировку для поискового запроса.

Parameters
setTerritoryOfInterest(territoryOfInterest: Geometry | null): SearchQueryBuilder

Задать слабое ограничение области поиска: штраф за непопадание вместо строгого отбрасывания. Работает только с онлайн поиском. Будет проигнорировано при выставленном строгом ограничении поиска.

Parameters

territoryOfInterest

Returns
fromQuery(query: SearchQuery): SearchQueryBuilder

Начать построение запроса на основе запроса #query для изменения части параметров.

Исходный запрос #query остается без изменений

Parameters

SearchQueryWithInfo​

Класс с дополнительной информацией о поисковом запросе для вывода в UI-элементах.

new SearchQueryWithInfo(searchQuery: SearchQuery, title: string, subtitle: string)
Parameters

searchQuery

title

string

subtitle

string
Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

rubrics​

Возвращает список рубрик, по которым производится запрос.

searchQuery​

Возвращает объект поискового запроса.

subtitle​

string

Возвращает текст подзаголовка. Например, это может быть текст из поля subtitle объекта ISuggest.

title​

string

Возвращает текст заголовка, который описывает объекты поискового запроса. Например, это может быть текст из поля title объекта ISuggest.

SearchResult​

Результат работы поисковика.

new SearchResult()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
markerTitles(objectIds: DgisObjectId[]): Future<UIMarkerInfo[]>[]

Получение текстов маркеров по их идентификаторам. Возвращается vector <future

, так как в облако за запрос можно отправить не более 50 идентификаторов.

Parameters

objectIds

Идентификаторы маркеров.

Returns
Properties

actionWidgets​

Виджеты быстрых фильтров.

Это так называемые "быстрые фильтры" - фильтры, наиболее интересные пользователю. Их не больше 5.

autoUseFirstResult​

boolean

Признак того, что первый результат пригоден для непосредственного использования.

dynamicFilters​

Динамические фильтры для этого запроса.

firstPage​

Page|null

Первая страница результатов поиска.

itemMarkerInfos​

Асинхронное получение маркеров.

mainWidgets​

Виджеты фильтров.

nearbyRequested​

boolean

Признак того, что запрошены объекты поблизости.

representativeArea​

Прямоугольная область, подходящая для отображения результатов поиска.

searchResultType​

Тип поискового запроса.

SimpleCheckableItem​

Простой отмечаемый элемент из CheckableItemsGroup.

Extends: CheckableItem
new SimpleCheckableItem()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

filterType​

Получение списка фильтров, описывающих текущее состояние виджета. Может быть использован при формировании поискового запроса.

isChecked​

boolean

Получение состояния элемента.

text​

string

Получение текстового описания элемента.

type​

Получение типа отмечаемого элемента.

values​

string[]

Получение списка значений, по которым происходит фильтрация. Обычно одно значение.

SimpleClusterObject​

Кластер простых (simple) объектов-маркеров.

Extends: MapObject
new SimpleClusterObject()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
setIcon(icon: Image | null): void

Установка иконки кластера.

Parameters

icon

Image|null
Returns
void
Properties

anchor​

Получение и установка точки привязки иконки кластера.

animatedAppearance​

boolean

Получение и установка флага анимируемости появления кластера.

iconMapDirection​

Получение и установка угла поворота кластера на карте относительно направления на север, по часовой стрелке.

iconOpacity​

Получение и установка прозрачности иконки кластера.

iconWidth​

Получение и установка целевой ширины кластера, используемой для масштабирования.

objectCount​

number

Получение количества маркеров в кластере.

objects​

Получение списка маркеров в кластере.

position​

Получение позиции кластера на карте.

suppressOnOverlap​

boolean

Скрывать ли иконку при наложении с другими объектами (маркеры, подписи других объектов).

text​

string

Получение и установка подписи кластера.

textStyle​

Получение и установка стиля подписи кластера.

userData​

object|null

Произвольные пользовательские данные, прикрепленные к объекту.

zIndex​

Получение и установка уровня отрисовки объекта.

SimpleMapObject​

Объект на карте, для которого можно задавать видимость.

Extends: MapObject
new SimpleMapObject()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

bounds​

Прямоугольник минимального размера, содержащий геометрию.

isVisible​

boolean

levelId​

LevelId|null

Получение привязки объекта к этажу в здании.

userData​

object|null

Произвольные пользовательские данные, прикрепленные к объекту.

zIndex​

Получение уровня отрисовки объекта.

Source​

Источник данных на карте.

Это может быть источник пробочных данных, маршрутов, маркеров, произвольных геометрических или других объектов карты. У любого объекта карты могут быть свои свойства. Свойства объекта влияют на то, какие к нему применяются правила и параметры отображения, описаные в стилях карты. Стиль - набор параметров и правил отображения объектов карты, получаемый через редактор стилей и использующийся для отрисовки карты.

Свойства объекта могут быть заданы:

  • непосредственно для объекта;
  • источнику данных (все объекты, добавленные в источник, получают эти свойства);
  • карте (все объекты, добавленные на карту, получают эти свойства);
  • стилю (все объекты, к которым применён стиль, получают эти свойства). Список приведён в порядке понижения приоритета применения свойств. Даже если на карту не добавлен ни один источник данных, свойства стиля и карты всё равно повлияют на карту, т.к. есть специальные отображаемые объекты, например - фон.
new Source()
Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean

StatefulChannel​

Channel that holds a current value. The value is always available through the value getter.

Extends: Channel<T>
new StatefulChannel()
Methods
subscribe(callback: (value: T) => void): Connection

Subscribes to the channel events.

Parameters

callback

(value: T) => void

called on every new value

Returns
Connection

Connection used to unsubscribe

Properties

value​

T

Current value of the channel.

Style​

Стиль с набором свойств объектов карты (cм. ISource).

new Style()
Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

styleAttributes​

Получение свойств по умолчанию для объектов, к которым применён указанный слой.

StyleZoomFollowController​

Контроллер слежения за стилевым уровнем масштабирования карты.

new StyleZoomFollowController(animationDuration?: Duration)

Создание контроллера слежения за стилевым уровнем масштабирования карты.

Parameters

animationDuration?

Default: Duration.ofMilliseconds(300)

Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
setStyleZoom(styleZoom: StyleZoom): void

Установка нового значения стилевого уровня масштабирования.

Parameters

styleZoom

Returns
void
setStyleZoomRange(minStyleZoom: StyleZoom, maxStyleZoom: StyleZoom): void

Установка интервала допустимых значений стилевого уровня масштабирования.

Parameters

minStyleZoom

maxStyleZoom

Returns
void

Suggest​

Поисковая подсказка.

new Suggest()
Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

handler​

Обработчик выбора подсказки.

subtitle​

Подзаголовок подсказки.

suggestedType​

Тип подсказки.

title​

Заголовок подсказки.

SuggestObjectHandler​

Предложен конкретный объект справочника.

new SuggestObjectHandler()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

item​

Подсказанный объект.

SuggestQuery​

Запрос поисковой подсказки.

new SuggestQuery()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean

SuggestQueryBuilder​

Построитель запросов к подсказчику.

new SuggestQueryBuilder(queryText: string)

Начать построение запроса подсказки для заданного текста и области интереса.

Parameters

queryText

string
Returns
Methods
build(): SuggestQuery

Сформировать запрос к подсказчику.

destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
setAllowedResultTypes(allowedResultTypes: SuggestedType[]): SuggestQueryBuilder

Задать типы объектов, разрешенные в результате запроса.

по умолчанию все, кроме Route

Parameters

allowedResultTypes

Returns
setAreaOfInterest(rect: GeoRect | null): SuggestQueryBuilder

Задать прямоугольную область интереса в географических координатах. Типичным значением является visible_rect из ICamera - объемлющий прямоугольник области просмотра.

Parameters
setLimit(limit: number): SuggestQueryBuilder

Задать желаемое количество подсказок. Допустимы значения из диапазона [1; 50]

по умолчанию 10

Parameters

limit

number
Returns
setLocale(locale: Locale | null): SuggestQueryBuilder

Локаль, с которой производится запрос подсказки и отдаются результаты.

Parameters

locale

Locale|null
Returns
setRestrictionGeometry(restrictionGeometry: Geometry | null): SuggestQueryBuilder

Задать строгое ограничение области поиска геометрией. Для GeometryKind.Point геометрия будет преобразована в контур полигона с радиусом 250 метров.

GeometryKind.Polyline и GeometryKind.Polygon будут установлены как полигоны. Первая и последняя точки контура не обязаны совпадать.

Геометрия типа GeometryKind.Complex будет установлена как мулитиполигон.

по умолчанию ограничение отсутствует.

Parameters

restrictionGeometry

Returns
setSearchNearby(searchNearby: boolean): SuggestQueryBuilder

Указание поисковому движку использовать режим поиска рядом с пользователем. Сильно повышает значимость расстояния от пользователя.

Parameters

searchNearby

boolean
Returns
setSuggestorType(suggestorType: SuggestorType): SuggestQueryBuilder

Задать тип подсказчика.

по умолчанию #SuggestorType::Object

Parameters
setTerritoryOfInterest(territoryOfInterest: Geometry | null): SuggestQueryBuilder

Задать слабое ограничение области поиска: штраф за непопадание вместо строгого отбрасывания. Работает только с онлайн поиском. Будет проигнорировано при выставленном строгом ограничении поиска.

Parameters

territoryOfInterest

Returns
fromQuery(query: SuggestQuery): SuggestQueryBuilder

Начать построение запроса подсказки на основе запроса #query для изменения части параметров.

Исходный запрос #query остается без изменений

Parameters

SuggestResult​

Результат работы подсказчика.

new SuggestResult()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

suggests​

Набор предложенных вариантов подсказок.

набор пуст, если подходящие подсказки не найдены

SystemMemoryManager​

Интерфейс управления использованием системной памяти.

new SystemMemoryManager()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
reduceMemoryUsage(): void

Уменьшение использования памяти путём очистки всевозможных кешей и буферов.

Returns
void
instance(context: Context): SystemMemoryManager

Получение объекта для управления использованием системной памяти.

Parameters

TiltFollowController​

Контроллер слежения за углом наклона карты.

new TiltFollowController(styleZoomToTilt: StyleZoomToTiltRelation)

Создание контроллера слежения за углом наклона карты.

Parameters

styleZoomToTilt

зависимость угла наклона камеры от стилевого уровня масштабирования.

Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean

TiltGestureSettings​

Настройки жеста наклона.

new TiltGestureSettings()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

kinematicSettings​

Настройки кинематики наклона.

recognizeSettings​

Настройки распознавания наклона.

TimePoint​

Point in time stored as milliseconds since the epoch. Created with the factory methods ofEpochMilliseconds, ofEpochSeconds, now.

Methods
now(): TimePoint

Current point in time.

Returns
ofEpochMilliseconds(ms: number): TimePoint
Parameters

ms

number

milliseconds since the epoch (Unix timestamp in milliseconds)

Returns
ofEpochSeconds(seconds: number): TimePoint
Parameters

seconds

number

seconds since the epoch

Returns
Properties

epochMilliseconds​

number

Milliseconds since the epoch.

epochSeconds​

number

Seconds since the epoch.

TrafficControlModel​

Модель контрола пробок.

Этот интерфейс является потокобезопасным.

new TrafficControlModel(map: Map)

Функция создания модели элемента управления пробками.

Parameters

map

карта.

Returns
TrafficControlModel

Модель элемента управления видимостью пробок для карты.

Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
onClicked(): void

Действие при нажатии на контрол. Переключает видимость пробок на карте.

Returns
void
Properties

state​

Состояние элемента управления видимостью пробок.

stateChannel​

Состояние элемента управления видимостью пробок.

TrafficScoreProvider​

Подписка на обновления информации о величине пробок.

Этот интерфейс является потокобезопасным.

new TrafficScoreProvider()
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
fromGeoPoint(context: Context, point: GeoPoint): TrafficScoreProvider
Parameters
fromMap(map: Map): TrafficScoreProvider
Parameters
Properties

score​

Текущее состояние пробок и их балл.

scoreChannel​

Текущее состояние пробок и их балл.

TrafficSource​

Интерфейс класса, управляющего отображением пробок на карте.

Extends: Source
new TrafficSource(context: Context)
Parameters

context

Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean

Widget​

Базовый класс, представляющий виджет для фильтрации поисковой выдачи.

Виджеты возвращаются в результате поиска и предназначены для фильтрации или сортировки результата по определенным параметрам. Виджеты генерируются динамически для каждого результата поиска и могут отсутствовать для некоторых запросов. Виджет представляет один конкретный фильтр или их группу, объединённую общим признаком. Например, тип кухни в результатах поиска по запросу "Поесть".

new Widget()
Returns
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
Properties

caption​

string|null

Получение заголовка виджета. Может отсутствовать.

filters​

Получение списка фильтров, описывающих текущее состояние виджета. Может быть использован при формировании поискового запроса.

type​

Получение типа виджета.

ZoomControlModel​

Модель контрола зумирования. Контрол состоит из кнопок +/-, при нажатии на которые меняется масштаб карты. При достижении допустимой границы масштаба кнопка масштабирования в этом направлении становится неактивной. Методы объекта необходимо вызывать на одном потоке.

new ZoomControlModel(map: Map)
Parameters
Methods
destroy(): void

Releases the native object this handle refers to. Every TypeScript reference to the destroyed object becomes invalid: any further call on it throws an error.

Without destroy the native object lives as long as its JS handle. The garbage collector can collect the handle, but it only sees the small JS wrapper, not the native memory behind it. With little pressure on the JS heap the collector may not run, so a heavy native object can stay in memory long after it was last used. Call destroy once the object is definitely no longer needed to release the native memory deterministically.

Returns
void
equals(other: NativeObject): boolean

Checks whether this handle and other refer to the same native object.

Every call that returns a native object creates a fresh TypeScript wrapper, so === between two wrappers of the same underlying object is always false. Use equals to compare identity instead: it returns true only when both handles point to the same C++ object. Wrappers of distinct objects, and any handle whose object was destroyed, compare as not equal.

Parameters

other

NativeObject
Returns
boolean
isEnabled(button: ZoomControlButton): StatefulChannel<boolean>
Parameters
setPressed(button: ZoomControlButton, value: boolean): void
Parameters

button

value

boolean
Returns
void