method
activeLevel
activeLevel(value: ActiveLevelMode): IndoorBuildingMode
array
boolean
borders
bySystem
calcPositionForGeometry
calcPositionForGeometry(camera: BaseCamera, geometry: Geometry, styleZoomToTiltRelation: StyleZoomToTiltRelation | null, screenArea: Padding | null, tilt: Tilt | null, bearing: Bearing | null, size: ScreenSize | null): CameraPosition
camera
geometry
styleZoomToTiltRelation
screenArea
tilt
bearing
size
calcPositionForObjects
calcPositionForObjects(camera: BaseCamera, objects: SimpleMapObject[], styleZoomToTiltRelation: StyleZoomToTiltRelation | null, screenArea: Padding | null, tilt: Tilt | null, bearing: Bearing | null, size: ScreenSize | null): CameraPosition
camera
objects
styleZoomToTiltRelation
screenArea
tilt
bearing
size
closed
closingSoon
CompassControl
CompassControl(map: CompassControlProps): Element
A self-contained compass control that creates its own [CompassControlModel], subscribes to the bearing channel, and renders the compass UI.
Hidden when the map faces north; fades in/out with animation.
CompassControlView
CompassControlView(__namedParameters: CompassControlViewProps): Element
Presentational compass control — rotates to show the current bearing, fades out at north.
CopyrightControl
CopyrightControl(props: CopyrightControlProps): Element
2GIS/URBI copyright logo — a plain View element rendered in JS, so it works identically on Android and iOS (no per-platform native view needed).
Subscribes to map.interactiveChannel, map.hideCopyrightChannel and
map.productTypeChannel; hides itself when the map requests it and switches
between the 2GIS/URBI logo depending on the product type baked into the license
key. Tapping the logo opens the corresponding product's URL.
On iOS the logo is automatically offset by safeAreaInsets so it never sits
under a notch, home indicator or status bar — the same way native iOS insets
the copyright frame by safeAreaInsets and Android adds system-bar insets.
The edgeInsets prop is added on top of the safe-area insets.
MapView renders this automatically (see its copyrightAlignment/
copyrightEdgeInsets/copyrightUriOpener props) — use this component directly
only for custom compositions that bypass MapView's default overlay.
createDefaultMaxTiltRestriction
createDefaultMaxTiltRestriction(): StyleZoomToTiltRelation
Получаем стандартную зависимость максимального угла наклона от стилевого уровня масштабирования.
createDefaultStyleZoomToTiltRelation
createDefaultStyleZoomToTiltRelation(): StyleZoomToTiltRelation
Получение зависимости угла наклона камеры от стилевого уровня масштабирования для стандартного контроллера слежения за наклоном.
createStyleZoomToTiltRelation
createStyleZoomToTiltRelation(points: [StyleZoom, Tilt][]): StyleZoomToTiltRelation
Создаем зависимость угла наклона камеры от стилевого уровня масштабирования.
points
Точки, по которым строится зависимость.
зависимость угла наклона камеры от стилевого уровня масштабирования, если создать зависимость не удалось - бросаем исключение.
Зависимость должна представлять собой монотонную непрерывную функцию. Если точками задана зависимость, не удовлетворяющая условиям, то функция бросает исключение. Зависимость, примерно как в 2гис, можно задать последовательностью точек [(17, 0), (19, 15), (20, 25)] в режиме карты и [(15, 0), (16, 34), (17, 48)] в режиме навигатора. Пусть нужно получить значение угла наклона камеры T для стилевого уровня масштабирования Z, такого что Z0 < = Z < Z1 и зависимость задана точками [(Z0, T0), (Z1, T1)]. Тогда искомое значение рассчитывается по формуле T = T0 + k * (T1 - T0), где k = (Z - Z0) / (Z1 - Z0). Если Z < Z0, то T = T0. Если Z >= Z1, то T = T1.
data
defaultAppearance
defaultAppearance(): MapAppearance
Внешний вид карты по умолчанию: следование системной теме со стандартными светлой (default_theme) и тёмной (default_dark_theme) темами.
defaultAppearanceInverted
defaultAppearanceInverted(): MapAppearance
Внешний вид карты по умолчанию с перевёрнутыми темами: светлая тема в платформенном тёмном режиме и наоборот.
defaultSource
defaultSource(value: DefaultRasterUrlTemplate): RasterUrlTemplate
directoryObject
directoryObject(value: DirectoryObject): SearchHistoryItem
effectiveTheme
effectiveTheme(appearance: MapAppearance, isPlatformDarkMode: boolean): MapTheme
Тема карты, которую задаёт этот внешний вид: для BySystem - светлая или тёмная по платформенному тёмному режиму, для Fixed - всегда его тема, независимо от is_platform_dark_mode.
empty
empty(): AttributeValue
error
event
eventCenter
eventCenter(value: GestureActionEventCenter): GestureActionPoint
fixed
flagFilter
fromAsset
fromAsset(value: CertificateFromAsset): Certificate
fromAsset
fromAsset
fromAsset(value: VendorConfigFromAsset): VendorConfig
fromFile
fromFile(value: CertificateFromFile): Certificate
fromFile
fromFile
fromFile(value: VendorConfigFromFile): VendorConfig
fromString
fromString
fromString(value: VendorConfigFromString): VendorConfig
geoPoint
geoPoint
geoPointWithElevation
geoPointWithElevation(value: GeoPointWithElevation): PointGeometryData
geoRect
imageDataToDataUri
imageDataToDataUri(imageData: ImageData): string | null
Конвертирует ImageData из SDK в data:-URI для <Image> из React Native.
incompleteTextHandler
incompleteTextHandler(value: IncompleteTextHandler): SuggestHandler
IndoorControl
IndoorControl(map: IndoorControlProps): Element
A self-contained indoor floor picker that creates its own [IndoorControlModel], subscribes to level channels, and renders the indoor UI.
Hidden when no indoor building is visible on the map.
IndoorControlView
IndoorControlView(__namedParameters: IndoorControlViewProps): Element | null
Presentational indoor control.
integer
intervalSchedule
intervalSchedule(value: PublicTransportIntervalSchedule): PublicTransportSchedule
isOpenAllDay
isOpenNow
location
location(value: AddressLocation): AddressComponent
logicalPixel
makeCompassControlColors
makeCompassControlColors(colors?: MapControlsColors): CompassControlColors
Derives CompassControlColors from the base palette.
makeIndoorControlColors
makeIndoorControlColors(colors?: MapControlsColors): IndoorControlColors
Derives IndoorControlColors from the base palette.
makeMyLocationControlColors
makeMyLocationControlColors(colors?: MapControlsColors): MyLocationControlColors
Derives MyLocationControlColors from the base palette.
makeTrafficControlColors
makeTrafficControlColors(colors?: MapControlsColors): TrafficControlColors
Derives TrafficControlColors from the base palette.
makeZoomControlColors
makeZoomControlColors(colors?: MapControlsColors): ZoomControlColors
Derives ZoomControlColors from the base palette.
mapPosition
mapPosition(value: GestureActionMapPosition): GestureActionPoint
MapView
MapView(__namedParameters: MapViewProps): Element
React Native component that renders a 2GIS map.
Give it a controllerState (see useMapController) and an optional style
(the map fills the component's bounds). While the map is being created the
component shows a cover in the map's loading background color; the map
appears once the controller is ready.
const controllerState = useMapController(context, options);
<MapView controllerState={controllerState} style={{ flex: 1 }} />
The copyright logo is a plain View element rendered in JS on top of the map
surface (see CopyrightControl), so it renders identically on Android and iOS
and is included automatically — no separate widget needs to be composed by
the caller. The logo's visibility is driven entirely by the map's
hideCopyrightChannel; use copyrightAlignment/copyrightEdgeInsets/
copyrightUriOpener to control its position and tap behaviour.
A MapController is backed by native map memory that the JavaScript garbage
collector does not see — it only tracks the small JS wrapper. With little
memory pressure on the JS side the collector may not run, so a controller can
stay alive long after the last reference to it is gone, keeping its native
memory held. Nothing in the SDK destroys a controller implicitly: to release
the native memory deterministically, call destroy() yourself once the map
is no longer needed, and only when nothing in your code references the
controller anymore.
MyLocationControl
MyLocationControl(map: MyLocationControlProps): Element
A self-contained my-location control that creates its own [MyLocationControlModel], subscribes to follow-state, enabled, and quality channels, and renders the UI.
The caller is responsible for:
- Adding a
MyLocationMapObjectSourceto the map (to show the blue dot) - Handling permission requests via
onPermissionRequest
MyLocationControlView
MyLocationControlView(__namedParameters: MyLocationControlViewProps): Element
Presentational my-location control.
none
none(): VendorConfig
number
number
object
object(value: [string, AttributeValue][]): AttributeValue
objectHandler
objectHandler(value: SuggestObjectHandler): SuggestHandler
opened
openingSoon
orderedValues
overview
overview(value: OverviewMode): IndoorBuildingMode
parseGeoJson
parseGeoJson(geoJsonData: string): GeometryMapObject[]
parseGeoJsonFile
parseGeoJsonFile(fsPath: string): GeometryMapObject[]
performSearchHandler
performSearchHandler(value: PerformSearchHandler): SuggestHandler
preciseSchedule
preciseSchedule(value: PublicTransportPreciseSchedule): PublicTransportSchedule
projectionZToStyleZ
projectionZToStyleZ(projectionZ: Zoom, latitude: Latitude): StyleZoom
rangeFilter
readyMapController
readyMapController(controller: MapController): MapControllerState
Wraps an already created controller into a ready snapshot.
scale
searchQuery
searchQuery(value: SearchQueryWithInfo): SearchHistoryItem
sortingFilter
streetAddress
streetAddress(value: AddressStreet): AddressComponent
string
styleZToProjectionZ
styleZToProjectionZ(styleZ: StyleZoom, latitude: Latitude): Zoom
system
targetGeoPoint
targetGeoPoint(value: GestureActionTargetGeoPoint): GestureActionPoint
TrafficControl
TrafficControl(map: TrafficControlProps): Element
A self-contained traffic control that creates its own [TrafficControlModel], subscribes to the state channel, and renders the traffic UI.
Hidden when traffic data is not available in the region.
TrafficControlView
TrafficControlView(__namedParameters: TrafficControlViewProps): Element | null
Presentational traffic control.
useCompassControlState
useCompassControlState(model: CompassControlModel | null): CompassControlState
Subscribes to CompassControlModel.bearingChannel and returns state + callback.
useIndoorControlState
useIndoorControlState(model: IndoorControlModel | null): IndoorControlState
Subscribes to IndoorControlModel channels and returns state + callbacks.
useMapController
useMapController(context: Context, options: MapControllerOptions): MapControllerState
Creates a map controller and publishes its lifecycle as a snapshot walking
creating → ready | error.
The hook never destroys a controller it has published. In the common case
the map lives as long as the app and nobody has to. (The one exception is an
orphan: creation finished after the hook was unmounted — such a controller
was never visible to anyone and is destroyed immediately.) To release the native memory
deterministically, call destroy() yourself at a moment when nothing uses
the map anymore; an abandoned controller is reclaimed once the GC collects
its wrapper.
options is an effect dependency: pass a memoized object (or a module-level
constant). A fresh object literal on every render would recreate the map on
every render, abandoning the previous controller each time.
useMyLocationControlState
useMyLocationControlState(model: MyLocationControlModel | null, onPermissionRequest?: () => void): MyLocationControlState
Subscribes to MyLocationControlModel channels and returns state + callback.
onPermissionRequest is called when the button is pressed and the location
quality is degraded (permission needed). The caller is responsible for
requesting the actual platform permission.
useTrafficControlState
useTrafficControlState(model: TrafficControlModel | null): TrafficControlStateResult
Subscribes to TrafficControlModel.stateChannel and returns state + callback.
useZoomControlState
useZoomControlState(model: ZoomControlModel | null): ZoomControlState
Subscribes to ZoomControlModel channels and returns state + callbacks.
wmsSource
wmsSource(value: WmsRasterUrlTemplate): RasterUrlTemplate
workTime
ZoomControl
ZoomControl(map: ZoomControlProps): Element
A self-contained zoom control that creates its own [ZoomControlModel], subscribes to SDK channels, and renders the zoom UI.
ZoomControlView
ZoomControlView(__namedParameters: ZoomControlViewProps): Element
Presentational zoom control.
zoomOutToFitForGeometry
zoomOutToFitForGeometry(camera: BaseCamera, geometry: Geometry, styleZoomToTiltRelation?: StyleZoomToTiltRelation | null, size?: ScreenSize | null): CameraPosition
camera
geometry
styleZoomToTiltRelation?
Default: null
size?
Default: null
zoomOutToFitForObjects
zoomOutToFitForObjects(camera: BaseCamera, objects: SimpleMapObject[], styleZoomToTiltRelation?: StyleZoomToTiltRelation | null, size?: ScreenSize | null): CameraPosition
camera
objects
styleZoomToTiltRelation?
Default: null
size?
Default: null