// Generated by dts-bundle v0.7.3 // Dependencies for this module: // ../react // ../react-native-webview // ../react-native-webview/lib/WebViewTypes // ../three // ../@mappedin/mvf // ../@tweenjs/tween.js // ../minisearch // ../geojson declare module '@mappedin/react-native-sdk' { export { MiMapView } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView'; export type { TMiMapViewProps } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView'; export { MiMiniMap } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniMap'; export type { TMiMiniMapProps } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniMap'; export type { MapViewStore } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store'; export { getVenue, getVenueBundle } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; export type { TGetVenueOptions, TGetVenueBundleOptions, TGetVenueMakerOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineSearchOptions, TMappedinOfflineSearchAllOptions, TMappedinOfflineAllSearchMatch, TMapClickEvent, } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; export { STATE } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; export { COLLISION_RANKING_TIERS, MARKER_ANCHOR, E_BLUEDOT_STATE, MappedinCoordinate, labelThemes, E_BLUEDOT_MARKER_STATE, E_BLUEDOT_STATE_REASON, } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; export type { TSerializableJourneyOptions, TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common'; import type { TEnableBlueDotOptions as TEnableBlueDotOptionsBase, TLabelAllLocationCommonOptions as TLabelAllLocationCommonOptionsBase } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; export type { TJourneyOptions, TGeolocationObject, TPathOptions, TLabelAllLocationFlatLabelOptions, TLabelAllLocationFloatingLabelOptions, TAddFlatLabelOptions, TAddFloatingLabelOptions, TFlatLabelAppearance, TFloatingLabelAppearance, TFocusOnCameraOptions, TCameraTargets, TCameraAnimationOptions, TCameraTransform, TBlueDotPositionUpdate, TBlueDotStateChange, CAMERA_EVENT_PAYLOAD, E_CAMERA_EVENT, } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; export type { TEnableBlueDotOptionsBase, TLabelAllLocationCommonOptionsBase }; export type TEnableBlueDotOptions = Omit; export type TLabelAllLocationCommonOptions = Omit; export type { TMapViewRNOptions, TCameraChange } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store.types'; export type { TMiMapViewVenueOptions, TMiMapViewVenueMakerOptions } from '@mappedin/react-native-sdk/wrappers/common'; export type { IDirectionsResult, MappedinDirections, TMappedinDirective, IFlatLabels, TFlatLabelAllLocationsOptions, IFloatingLabels, TFloatingLabelAllLocationsOptions, } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; export type { TShowVenueOptions, E_GET_DIRECTIONS_MESSAGES } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; export { ERROR, ERROR_MESSAGES } from '@mappedin/react-native-sdk/wrappers/common/errors'; export { BEARING_TYPE, ACTION_TYPE, MappedinLocation, Mappedin, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinRankings, MappedinDestinationSet, E_CAMERA_DIRECTION, CAMERA_EASING_MODE, GET_VENUE_EVENT, } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; } declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView' { import React from 'react'; import { TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common'; import { STATE } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src'; import { MapViewStore } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store'; import type { TBlueDotPositionUpdate, TBlueDotStateChange, TMapClickEvent, MappedinPolygon, MappedinMap, Mappedin } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; import { ERROR, ERROR_MESSAGES } from '@mappedin/react-native-sdk/wrappers/common/errors'; import { TCameraChange, TMapViewRNOptions } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store.types'; export type TMiMapViewProps = { /** * The MapViewStore instance will be returned here */ ref: React.ForwardedRef; /** * Options to initialze MiMapView with */ options: TMiMapViewOptions & TMapViewRNOptions; /** * Venue Data to render inside the MapView. This is returned by {@link getVenue} or {@link getVenueBundle} */ venueData?: Mappedin; style?: React.CSSProperties; /** * @deprecated * Use onClick. Called when an interactive polygon is clicked */ onPolygonClicked?: (prop: { polygon: MappedinPolygon; }) => void; /** * Called when Blue Dot State is updated. This can be used to figure out why the Blue Dot is not visible */ onBlueDotStateChanged?: (prop: { stateChange: TBlueDotStateChange; }) => void; /** * Called when Blue Dot position is updated */ onBlueDotPositionUpdated?: (prop: { update: TBlueDotPositionUpdate; }) => void; /** * Called when the camera is updated */ onCameraChanged?: (prop: TCameraChange) => void; /** * Called when data is loaded for this venue */ onDataLoaded?: (prop: { venueData: Mappedin; }) => void; /** * @deprecated * Use onClick. Called when clicking outside any interactive polygons */ onNothingClicked?: () => void; /** * Called when the map is clicked. Payload contains the lat-lon of the click event, an array of interactive polygons that were clicked, and a flag indicating whether the click is likely above the blue dot. */ onClick?: (prop: TMapClickEvent) => void; /** * Called when the map is ready for interaction */ onFirstMapLoaded?: () => void; /** * Called when the map changes */ onMapChanged?: (prop: { map: MappedinMap; }) => void; /** * Called when the SDK state changes */ onStateChanged?: (prop: { state: STATE; }) => void; /** * Called if an error occurs loading the venue map */ onVenueLoadError?: (prop: { error: { name: ERROR; message: ERROR_MESSAGES; stack?: string; }; }) => void; }; /** * Mappedin MapView component */ export type MiMapView = (props: TMiMapViewProps) => React.ReactElement; /** * @category Component */ export const MiMapView: React.MemoExoticComponent & React.RefAttributes>>; } declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniMap' { import React from 'react'; import { TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common'; import type { MappedinLocation, Mappedin, TFocusOnCameraOptions, TCameraAnimationOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; import { ERROR, ERROR_MESSAGES } from '@mappedin/react-native-sdk/wrappers/common/errors'; export type TMiMiniMapProps = { /** * Options to initialze MiMapView with */ options: TMiMapViewOptions; style?: any; polygonHighlightColor?: string; /** * Called when minimap is rendereed */ onLoad?: () => void; /** * Venue Data to render inside the MapView. This is returned by {@link getVenue} */ venueData?: Mappedin; location: MappedinLocation['id'] | MappedinLocation; focusOptions?: TFocusOnCameraOptions & TCameraAnimationOptions; /** * Called if there's an error loading the minimap */ onMiniMapLoadError?: (prop: { error: { name: ERROR; message: ERROR_MESSAGES; stack?: string; }; }) => void; }; /** * Mappedin MiniMap component */ export type MiMiniMap = (props: TMiMiniMapProps) => React.ReactElement; /** * Mappedin MiniMap component * @category Component */ export const MiMiniMap: React.NamedExoticComponent; } declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store' { import { IFlatLabels, IFloatingLabels, TGetPolygonsAtCoordinateOptions, STATE, Mappedin, MappedinNode, MappedinMap, MappedinLocation, MappedinDirections, MappedinCategory, MappedinPolygon, TGetVenueOptions, TShowVenueOptions, MappedinCoordinate, MappedinDestinationSet, TCreateMarkerOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; import { RNMappedinController } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MappedinController'; import { TReactNativeFlatLabelAllLocations, TReactNativeFlatLabelAllLocationsLegacy, TSerializableJourneyOptions } from '@mappedin/react-native-sdk/wrappers/common'; import type { TGeolocationObject, TEnableBlueDotOptions, TPathOptions, TLabelAllLocationFloatingLabelOptions, TMappedinOfflineSearchOptions, TGetVenueMakerOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; import { TCameraManager } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store.types'; import { TAnimationOptions, TCreateTooltipCommonOptions, TCreateTooltipOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types'; export class MapViewStore extends RNMappedinController { #private; state: STATE; /** * @hidden */ constructor(); /** * Current map of Venue */ currentMap?: MappedinMap; options?: TGetVenueOptions; /** * @hidden */ loadVenue(options: TGetVenueOptions | TGetVenueMakerOptions, showVenueOptions: TShowVenueOptions & { prepareSearch?: boolean; searchOptions?: TMappedinOfflineSearchOptions; }): Promise; /** * * @hidden */ showVenue(venueData: Mappedin, showVenueOptions: TShowVenueOptions & { prepareSearch?: boolean; searchOptions?: TMappedinOfflineSearchOptions; }): Promise; /** * Clear any cached venue bundles that were downloaded as part of LOAD_VENUE with useBundle: true * This ensure that the next time keys are passed in, we get a fresh bundle */ clearBundleCache(): Promise; /** * Creates a tooltip attached to a {@link MappedinNode} or a {@link MappedinCoordinate} */ createTooltip( /** * Node or Coordinate to attach the tooltip to */ nodeOrCoordinate: MappedinNode | MappedinCoordinate, contentHtml: string, options?: TCreateTooltipOptions): Promise; /** * Creates a custom tooltip attached to a {@link MappedinNode} or a {@link MappedinCoordinate}, with any abitrary HTML code inside. */ createCustomTooltip( /** * Node or Coordinate to attach the tooltip to */ nodeOrCoordinate: MappedinNode | MappedinCoordinate, contentHtml: string, selector: string, options?: TCreateTooltipCommonOptions): Promise; /** * Remove tooltip by id */ removeTooltip(tooltipId: string): Promise; /** * Create a marker attached to a {@link MappedinNode}, with any abitrary HTML code inside. * @returns markerId This marker id can later be used to remove the marker */ createMarker(nodeOrCoordinate: MappedinNode | MappedinCoordinate, contentHtml: string, options: TCreateMarkerOptions): string; /** * Remove marker by id */ removeMarker(markerId: string): Promise; Markers: { add: (nodeOrCoordinate: MappedinNode | MappedinCoordinate, contentHtml: string, options: TCreateMarkerOptions) => string; remove: (markerId: string) => Promise; setPosition: (markerId: string, nodeOrCoordinate: MappedinNode | MappedinCoordinate) => Promise; animate: (markerId: string, nodeOrCoordinate: MappedinNode | MappedinCoordinate, animationOptions: TAnimationOptions) => Promise; }; /** * Set SDK state, which controls camera and other features geared towards a particular experience * * EXPLORE (default) * * FOLLOW - Lock Camera to the BlueDot so it follows it around the screen */ setState(state: STATE): Promise; /** * Set Polygon Color */ setPolygonColor( /** * Polygon */ polygon: MappedinPolygon, /** * Color to use */ color: string): Promise; /** * Clear Polygon Color */ clearPolygonColor(polygonOrPolygonId: MappedinPolygon['id'] | MappedinPolygon): Promise; /** * Clear all polygon colors */ clearAllPolygonColors(): Promise; /** * Make polygons clickable */ addInteractivePolygon(polygonOrPolygonId: MappedinPolygon['id'] | MappedinPolygon): Promise; /** * Remove all interactive polygons */ removeAllInteractivePolygons(): Promise; /** * Enables image flipping for a specific polygon */ enableImageFlippingForPolygon(polygon: MappedinPolygon): Promise; /** * @deprecated * Use `Paths.removeAll` instead. * * Remove all paths */ removeAllPaths(): Promise; /** * Change Map/Level */ setMap(mapIdOrMap: MappedinMap['id'] | MappedinMap): Promise; /** * Gets the nearest node by screen coordinate */ getNearestNodeByScreenCoordinates(x: number, y: number, mapIdOrMap?: MappedinMap['id'] | MappedinMap): Promise; /** * Label all polygons with locations either loaded via the API or passed in * @deprecated Please use FloatingLabels.labelAllLocations or FlatLabels.labelAllLocations instead. */ labelAllLocations(options?: TLabelAllLocationFloatingLabelOptions | TReactNativeFlatLabelAllLocations | TReactNativeFlatLabelAllLocationsLegacy): Promise; FlatLabels: IFlatLabels>; FloatingLabels: IFloatingLabels>; /** * Finds the primary {@link MappedinLocation} associated with a {@link MappedinPolygon}. * This means a location attached to the polygon that has no parents, or, if there * are none of those, a location nearest the top of some hierarchy that does have the * polygon attached. * * ```tsx * // Log the primary location of a clicked polygon * onClick={({ polygons }) => { * if (polygons.length > 0) { * for(const polygon of polygons) { * console.log(await mapView.current?.getPrimaryLocationForPolygon(polygon)); * } * } * }); * ``` * * @param polygon The {@link MappedinPolygon} you want the primary location of. * @returns The primary {@link MappedinLocation} or null if none found. */ getPrimaryLocationForPolygon(polygon: MappedinPolygon): Promise; /** * Get all polygons that intersect with a specific coordinate. */ getPolygonsAtCoordinate(coordinate: MappedinCoordinate, options?: TGetPolygonsAtCoordinateOptions): Promise; /** * Get all polygons that intersect with a specific screen coordinate. */ getPolygonsAtScreenCoordinate(x: number, y: number, options?: TGetPolygonsAtCoordinateOptions): Promise; /** Camera controls interface */ Camera: TCameraManager; /** * Journey management interface */ Journey: { /** * Visualize directions by drawing paths, and adding connection markers */ draw: (directions: MappedinDirections | MappedinDirections[], options?: TSerializableJourneyOptions) => Promise; /** * Remove any paths and markers associated with journey */ clear: () => Promise; /** * Set the current step of a multi-part journey */ setStep: (step: number) => Promise; setStepByPath: (path: { id: string; }) => Promise; }; /** * BlueDot control interface */ BlueDot: { /** * Enable BlueDot */ enable: (options?: TEnableBlueDotOptions) => Promise; /** * Disable BlueDot */ disable: () => Promise; }; /** * Override BlueDot location data. This can be used to pass native location data * @hidden */ overrideLocation(location: TGeolocationObject): void; /** * Get Directions */ getDirections(props: { from: MappedinNode | MappedinLocation | MappedinPolygon; to: MappedinNode | MappedinLocation | MappedinPolygon | MappedinDestinationSet; accessible?: boolean; }): Promise; /** * Add or remove paths from the map */ Paths: { add: (nodes: MappedinNode[], options?: TPathOptions) => Promise; remove: (path: { id: string; }) => Promise; removeAll: () => Promise; }; /** * @deprecated * Use `Paths.add` instead. * * Draw a path based on a list of Nodes */ drawPath(pathNodesOrNodeIds: (MappedinNode | MappedinNode['id'])[], pathOptions: TPathOptions): Promise; OfflineSearch: { /** * * @param query String to search for */ search: (query: string) => Promise; /** * * @param query Get a list of suggestions for query */ suggest: (query: string) => Promise; addQuery: (params: { /** * Query string to match for this object */ query: string; /** * Object that is returned when query matches */ object: MappedinLocation | MappedinCategory | Record; /** * Optional weight to multiply by the score */ weight?: number; }) => Promise; }; /** * @hidden */ static instance: MapViewStore; } } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn' { import { getVenue, getVenueBundle, Mappedin, MappedinDestinationSet } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import { randomId } from '@mappedin/react-native-sdk/sdks/packages/common/random-id'; export * from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.enums'; export { getVenue, /** * @deprecated */ getVenueBundle, MappedinDestinationSet, Mappedin, randomId, }; export { labelThemes } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types'; export type { ThingsOption } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types'; export type { IFlatLabels } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/FlatLabels'; export type { IFloatingLabels } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/FloatingLabels'; export type { TBlueDotPositionUpdate, TBlueDotStateChange, TJourneyOptions, TMapViewOptions, TCreateMarkerOptions, TGeolocationObject, TPathOptions, TFlatLabelOptions, TAddFloatingLabelOptions, TAddFlatLabelOptions, TLabelAllLocationCommonOptions, TFloatingLabelAllLocationsOptions, TFlatLabelAllLocationsOptions, TLabelAllLocationFlatLabelOptions, TLabelAllLocationFloatingLabelOptions, TEnableBlueDotOptions, TFloatingLabelAppearance, TFlatLabelAppearance, CAMERA_EVENT_PAYLOAD, TMapClickEvent, TGetPolygonsAtCoordinateOptions, TShowVenueOptions, TAnimationOptions, TCreateTooltipOptions, TShowWatermarkOptions, } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types'; export { BEARING_TYPE, ACTION_TYPE } from '@mappedin/react-native-sdk/sdks/packages/navigator'; export type { IDirectionsResult, E_MESSAGES as E_GET_DIRECTIONS_MESSAGES } from '@mappedin/react-native-sdk/sdks/packages/navigator'; export type { TGetVenueBundleOptions, TGetVenueOptions, TGetVenueMakerOptions, TMappedinDirective, TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineSearchAllOptions, TMappedinOfflineAllSearchMatch, TDirectionToOptions, } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; export { MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinDirections, MappedinNavigatable, MappedinCoordinate, MappedinRankings, OfflineSearch, MappedinCollectionType, GET_VENUE_EVENT, } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; export type { TSafeAreaInsets, TCameraTargets, TFocusOnCameraOptions, TCameraTransform, TCameraAnimationOptions, TCameraInteractionsSetOptions, } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/CameraController'; export { MAP_RENDER_MODE } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.enums'; } declare module '@mappedin/react-native-sdk/wrappers/common' { export * from '@mappedin/react-native-sdk/wrappers/common/events'; export * from '@mappedin/react-native-sdk/wrappers/common/payloads'; export * from '@mappedin/react-native-sdk/wrappers/common/types'; export { processBridgeOptions } from '@mappedin/react-native-sdk/wrappers/common/options'; export { PubSub } from '@mappedin/react-native-sdk/wrappers/common/pub-sub'; } declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store.types' { import { MappedinNode, MappedinPolygon } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src'; import { MappedinCoordinate, MAP_RENDER_MODE } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import type { MappedinCategory, MappedinLocation, TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import { CAMERA_EVENT_PAYLOAD, E_CAMERA_EVENT, E_CAMERA_DIRECTION, TCameraTransform, TCameraTargets, TFocusOnCameraOptions, TCameraAnimationOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; import { TFocusOptionsLegacy } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/Core.interface'; export type TPolygonColorOptions = { color: string; opacity?: number; textColor?: string; }; export type { TFocusOptionsLegacy }; export type TFocusOptionsLegacySerializable = Omit & { nodes: (MappedinNode | MappedinNode['id'])[]; polygons: (MappedinPolygon['id'] | MappedinPolygon)[]; }; export type TMapViewRNOptions = { /** * Use a bundle for venue loading and cache it for faster subsequent loading * @beta */ useBundle?: boolean; loadOptions?: { /** * By default, the SDK will merge all geometries by material to reduce the number of draw calls to the GPU * To rever back to using a single geometry for every polygon, pass `MAP_RENDER_MODE.MULTI_GEOMETRY` */ mapRenderStrategy?: MAP_RENDER_MODE; }; /** * Generate a search index for venue when rendering map, instead of deferring to when the first search occurs. * @default false */ prepareSearch?: boolean; /** * Customize search weights */ searchOptions?: TMappedinOfflineSearchOptions; }; export type TMappedinOfflineSearchBridgeResult = Omit & { object: { type: 'MappedinLocation' | 'MappedinCategory' | 'Custom'; id: string; }; }; export type TMappedinCustomSearchObject = MappedinLocation | MappedinCategory | Record; /** * Camera changed payload */ export type TCameraChange = CAMERA_EVENT_PAYLOAD[E_CAMERA_EVENT.CHANGED]; export type TCameraManager = { position?: MappedinCoordinate; tilt: number; zoom: number; rotation: number; set: (positionOptions: TCameraTransform) => Promise; focusOn: (targets: TCameraTargets, options?: TFocusOnCameraOptions & TCameraAnimationOptions) => Promise; animate: (config: TCameraTransform, options?: TCameraAnimationOptions) => Promise; translate: (direction: E_CAMERA_DIRECTION, distance: number, options?: TCameraAnimationOptions) => Promise; setMaxTilt: (radians: number) => Promise; setMinZoom: (meters: number) => Promise; setMaxZoom: (meters: number) => Promise; setSafeAreaInsets: (safeAreaInsets: { top: number; bottom: number; left: number; right: number; }) => void; }; } declare module '@mappedin/react-native-sdk/wrappers/common/errors' { export enum ERROR { LOAD_VENUE_FAILED = "LOAD_VENUE_FAILED", SHOW_VENUE_FAILED = "SHOW_VENUE_FAILED", SET_MAP_FAILED = "SET_MAP_FAILED", SHOW_MINIMAP_ERROR = "SHOW_MINIMAP_ERROR", LOAD_MINIMAP_ERROR = "LOAD_MINIMAP_ERROR" } export enum ERROR_MESSAGES { GENERIC_LOAD_VENUE_ERROR = "Unable to load Venue. Please check your keys", GENERIC_SET_MAP_ERROR = "Unable to set map, check that you're passing a valid map" } } declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src' { export { MiMapView } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView'; export type { TMiMapViewProps } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView'; export { MiMiniMap } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniMap'; export type { TMiMiniMapProps } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniMap'; export type { MapViewStore } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store'; export { getVenue, getVenueBundle } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; export type { TGetVenueOptions, TGetVenueBundleOptions, TGetVenueMakerOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineSearchOptions, TMappedinOfflineSearchAllOptions, TMappedinOfflineAllSearchMatch, TMapClickEvent, } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; export { STATE } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; export { COLLISION_RANKING_TIERS, MARKER_ANCHOR, E_BLUEDOT_STATE, MappedinCoordinate, labelThemes, E_BLUEDOT_MARKER_STATE, E_BLUEDOT_STATE_REASON, } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; export type { TSerializableJourneyOptions, TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common'; import type { TEnableBlueDotOptions as TEnableBlueDotOptionsBase, TLabelAllLocationCommonOptions as TLabelAllLocationCommonOptionsBase } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; export type { TJourneyOptions, TGeolocationObject, TPathOptions, TLabelAllLocationFlatLabelOptions, TLabelAllLocationFloatingLabelOptions, TAddFlatLabelOptions, TAddFloatingLabelOptions, TFlatLabelAppearance, TFloatingLabelAppearance, TFocusOnCameraOptions, TCameraTargets, TCameraAnimationOptions, TCameraTransform, TBlueDotPositionUpdate, TBlueDotStateChange, CAMERA_EVENT_PAYLOAD, E_CAMERA_EVENT, } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; export type { TEnableBlueDotOptionsBase, TLabelAllLocationCommonOptionsBase }; export type TEnableBlueDotOptions = Omit; export type TLabelAllLocationCommonOptions = Omit; export type { TMapViewRNOptions, TCameraChange } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store.types'; export type { TMiMapViewVenueOptions, TMiMapViewVenueMakerOptions } from '@mappedin/react-native-sdk/wrappers/common'; export type { IDirectionsResult, MappedinDirections, TMappedinDirective, IFlatLabels, TFlatLabelAllLocationsOptions, IFloatingLabels, TFloatingLabelAllLocationsOptions, } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; export type { TShowVenueOptions, E_GET_DIRECTIONS_MESSAGES } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; export { ERROR, ERROR_MESSAGES } from '@mappedin/react-native-sdk/wrappers/common/errors'; export { BEARING_TYPE, ACTION_TYPE, MappedinLocation, Mappedin, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinRankings, MappedinDestinationSet, E_CAMERA_DIRECTION, CAMERA_EASING_MODE, GET_VENUE_EVENT, } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; } declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MappedinController' { import WebView from 'react-native-webview'; import { WebViewMessage } from 'react-native-webview/lib/WebViewTypes'; import { BRIDGE_EVENT_PAYLOADS, PubSub } from '@mappedin/react-native-sdk/wrappers/common'; import { MappedinController } from '@mappedin/react-native-sdk/wrappers/common/controller'; import { Mappedin } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src'; export class RNMappedinController extends MappedinController { #private; /** * @hidden */ publicEventBus: PubSub; /** * @hidden */ setWebView(wv: WebView): void; /** * @hidden */ _setiFrame(iframe: any): void; /** * Override how we handle messages we receive from the native side here * @hidden */ onMessageReceived(data: WebViewMessage['data']): void; /** * Venue Data */ venueData?: Mappedin; /** * @hidden */ constructor(); /** * Override how we send the message to the native side * @hidden */ sendMessage(eventName: EVENT_NAME, payload?: { msgID?: string; data: BRIDGE_EVENT_PAYLOADS[EVENT_NAME] | null; }): void; } } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types' { import type { MAP_RENDER_MODE, Mappedin, MappedinCoordinate, MappedinLocation, MappedinMap, MappedinNode, MappedinPolygon, ThingsOption } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import type { TFloatingLabelAppearance } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.FloatingLabel'; import type { TEnableBlueDotOptions, TBlueDotPositionUpdate, TBlueDotStateChange } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core'; import type { Euler, Object3D, Vector3 } from 'three'; import type { Path } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/PathsController'; import { TOOLTIP_ANCHOR } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.SmartTooltip'; import { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT, CAMERA_EASING_MODE, E_MAP_CHANGED_REASON, STACKED_MAPS_STATE } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.enums'; import { TOutdoorViewOptions, TOutdoorViewOptionsWithHeaders, TOutdoorViewOptionsWithAuthURL } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/OutdoorViewController'; import { IPubSub, PubSub } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/pub-sub'; export type { TEnableBlueDotOptions, TFloatingLabelAppearance, ThingsOption }; /** @internal */ export type Without = { [P in Exclude]?: never; }; /** @internal */ export type XOR = T | U extends object ? (Without & U) | (Without & T) : T | U; /** An extension of the GeolocationPosition type. https://developer.mozilla.org/en-US/docs/Web/API/GeolocationPosition */ export type TGeolocationObject = { timestamp: number; type?: GEOLOCATION_STATUS; positionIndex?: number; coords: { latitude: number; longitude: number; accuracy: number; floorLevel?: number; }; /** * Optional property to override the bearing of the bluedot. * Specifies the clockwise rotation angle in degrees from North. * For example: * - A value of 0 (or undefined) indicates North. * - A value of 90 indicates East. * - A value of 180 indicates South. * - A value of 225 indicates SouthWest. * This property helps in setting a specific orientation for the bluedot. */ bearing?: number; }; export type { TBlueDotPositionUpdate, TBlueDotStateChange }; export type TPathOptions = { /** * Path Color. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`. * @defaultValue #4b90e2 */ color?: string; /** * Color of path pulse. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`. * @defaultValue '#ffffff' */ pulseColor?: string; /** * Number of iterations to pulse to indicate direction. * @defaultValue 1 */ pulseIterations?: number; /** * How many milliseconds to wait before starting the next pulse after the current pulse travels the entirety of the path. * @defaultValue 750 */ pulsePauseDuration?: number; /** * Radius of path at nearest zoom, in metres. * @defaultValue 1.8 */ nearRadius?: number | (() => number); /** * Radius of path at furthest zoom, in metres. * @defaultValue 2.3 times nearRadius */ farRadius?: number | (() => number); /** * Zoom level where the path size is `nearRadius`. * @defaultValue 375 */ nearZoom?: number; /** * Zoom level where the path size is `farRadius`. * @defaultValue 10000 */ farZoom?: number; /** * Duration of path drawing in milliseconds. * @defaultValue 1500 */ drawDuration?: number; /** * Show arrows on path. * @defaultValue true */ displayArrowsOnPath?: boolean; /** * Animate arrows on path. * @defaultValue true */ animateArrowsOnPath?: boolean; /** * Flatten the path to a 2D line. * @defaultValue false */ flattenPath?: boolean; /** * Show an animated pulse indicating the direction of travel. * @defaultValue true */ showPulse?: boolean; /** * Animate the drawing of the path in the direction of travel. * @defaultValue true */ animateDrawing?: boolean; /** * Whether the path should be clickable. * @defaultValue false */ interactive?: boolean; /** * @experimental * * @defaultValue false * The path will be adjusted vertically to the tallest polygon altitude. */ adjustedAltitude?: boolean; /** * @experimental * * The maximum altitude of the path in meters. * @defaultValue Infinite */ maxAdjustedAltitude?: number; /** * @experimental * * @defaultValue -Infinite * The minimum altitude of the path in meters. */ minAdjustedAltitude?: number; }; export type TConnectionProps = { /** * Connection type, "escalator", "elevator", etc */ type: any; /** * Direction "up" or "down" or null if on the same floor */ direction?: string; /** * Depending on the direction of the journey, the map name of the destination map or where a connection enters the map */ toMapName?: string; /** * Icon to use for the connection, can be wrapped in SVG and for styling * * @example: * ${icon} * * */ icon?: string; /** * Whether the user is entering or exiting the connection */ isEntering?: boolean; }; export type TConnectionTemplateFn = ({ direction, type, toMapName }: TConnectionProps) => string; export type TMarkerTemplateProps = { icon: string; location?: MappedinLocation; }; export type TMarkerTemplateFn = ({ icon, location }: TMarkerTemplateProps) => string; /** * Configure the behaviour of a {@link Journey}. */ export type TJourneyOptions = { /** * What color to highlight departure and destination polygons * Pass false to disable * @default '#7babc8' */ polygonHighlightColor?: string | false; /** * Path Options */ pathOptions?: TPathOptions; /** * Path Options for the non-current path in multi-destination mode. */ inactivePathOptions?: TPathOptions; /** * Function that returns an HTML template to use as a connection tooltips (elevators, escalators, etc) */ connectionTemplate?: TConnectionTemplateFn; /** * Function that returns an HTML template to use as a destination marker. * Override with null | undefined to disable */ destinationMarkerTemplate?: TMarkerTemplateFn; /** * Function that returns an HTML template to use as a departure marker. * Override with null | undefined to disable */ departureMarkerTemplate?: TMarkerTemplateFn; /** * Path Options for map to map vertical paths. */ connectionPathOptions?: TPathOptions; overviewPathOptions?: TPathOptions; overviewPathOnConnectionsOptions?: TPathOptions; showOverviewPathOnMap?: MappedinMap; overviewPathMode?: 'always' | 'current-elevation-and-mapgroup' | 'current-elevation'; overviewInactivePathSizeFactor?: number; overviewPathInactiveColor?: string; }; export const labelThemes: { lightOnDark: { text: { foregroundColor: string; backgroundColor: string; numLines: number; lineHeight: number; size: number; maxWidth: number; }; marker: { foregroundColor: { active: string; inactive: any; }; backgroundColor: { active: string; inactive: any; }; size: number; }; margin: number; }; darkOnLight: { text: { foregroundColor: string; backgroundColor: string; numLines: number; lineHeight: number; size: number; maxWidth: number; }; marker: { foregroundColor: { active: string; inactive: any; }; backgroundColor: { active: string; inactive: any; }; size: number; }; margin: number; }; }; export type TPadding = { top: number; left: number; bottom: number; right: number; }; /** * Options for controlling the behavior of a {@link Marker}. */ export type TCreateMarkerOptions = { /** * The rank of the Marker used when comparing colliders to determine which should be shown. */ rank?: COLLISION_RANKING_TIERS | number; /** * The anchor point of the Marker. */ anchor?: MARKER_ANCHOR; /** * Whether the Marker should be clickable and included in {@link E_SDK_EVENT.CLICK} events. * @default false */ interactive?: boolean; /** * Optional layer to attach the {@link Marker} to. */ layer?: string; /** * @internal */ id?: string; }; /** * Configurations for an animation */ export type TAnimationOptions = { /** * Animation duration in milliseconds */ duration?: number; /** * Mode for easing in and out of the animation. */ easing?: CAMERA_EASING_MODE; }; /** * @internal */ export type TCreateTooltipInternalOptions = { id?: string; nodeOrCoordinate: MappedinNode | MappedinCoordinate; html?: string; contentHtml?: string; selector?: string; options?: TCreateTooltipCommonOptions | TCreateTooltipOptions; interactive?: boolean; }; export type TCreateTooltipCommonOptions = { /** * An object used to disable certain anchor positions from being used. */ enabledAnchorTypes?: TOOLTIP_ANCHOR; /** * Default (starting) anchor for tooltips */ defaultAnchorType?: keyof TOOLTIP_ANCHOR; /** * The rank of the object used when comparing colliders to determine which should be shown. */ collisionRank?: COLLISION_RANKING_TIERS; /** * Optional layer to attach the Tooltip to. */ layer?: string; dotColor?: string; dotSize?: number; }; export type TCreateTooltipOptions = TCreateTooltipCommonOptions & { /** * The distance in pixels to offset the Tooltip from the anchor point. */ padding?: number; /** * Whether the Tooltip should be clickable and included in {@link E_SDK_EVENT.CLICK} events. * @default false */ interactive?: boolean; }; export type TCreateTextTooltipOptions = TCreateTooltipCommonOptions & { /** * Instead of passing html pass in plain text to be displayed in the tooltip */ text: string; /** * The distance in pixels to offset the Tooltip from the anchor point. */ padding?: number; }; export type TCreateCustomInnerHTMLTooltipOptions = TCreateTooltipCommonOptions & { /** * Use mappedin's default tooltip styling with custom inner html content */ contentHtml: string; /** * The distance in pixels to offset the Tooltip from the anchor point. */ padding?: number; }; export type TCreateCustomTooltipOptions = TCreateTooltipCommonOptions & { /** * Pass in custom html for your marker, if using this method you must also pass in a selector for your content. */ html: string; /** * Used in conjuction with the html property to select the div for repositioning */ selector: string; }; export type TCreateThreeDMarkerOptions = { /** * map to add the marker to */ mapOrMapId: MappedinMap | MappedinMap['id']; /** * the marker object to add to the scene */ object: Object3D; /** * if provided, sets the object's position on the map */ position?: Vector3; /** * if provided, sets the object's rotation relative to the map */ rotation?: Euler; /** * if provided, sets the object's scale relative to the map */ scale?: Vector3; }; export type TGetPolygonsAtCoordinateOptions = { /** * Specifies whether polygons that cannot be interacted with should be * included in the results. Default is `false`. */ includeNonInteractive?: boolean; }; export type TMapViewOptions = { /** * Enable shading of bottoms of geometry along with outlines to make geometry stand out. */ shadingAndOutlines?: boolean; /** * @experimental * * Enable ambient occlusion. Only works in single buffer mode and when device supports WebGL2. * @default false */ aoEnabled?: TAOConfiguration['aoEnabled']; /** * @experimental * * Enable debug mode to check the visual representation of performance stats. * @default false */ debug?: boolean; /** * @experimental * * Adjust some quality settings automatically based on the current FPS. * The algorithm will try to keep the FPS at 25 or higher by following the steps below: * * - If the FPS remains below 26 for the last 5 seconds, the ambient occlusion and antialiasing quality will be decreased. * - If the FPS remains below 26 for the next 5 seconds, the ambient occlusion and antialiasing quality will be decreased again. * - If the FPS remains below 26 for another 5 seconds, the ambient occlusion and antialiasing effects will be disabled, * and path animation will be disabled, textures' anisotropy will be decreased. * The same will happen if the FPS remains below 10 for the last 5 seconds. * * @default true */ dynamicPerformance?: boolean; /** * @experimental * * Change the quality of ambient occlusion in the scene. Greater quality means less noise, but worse performance. * @default 'medium' */ aoQuality?: TAOConfiguration['aoQuality']; /** * @experimental * * Change the resolution of ambient occlusion. Lower resolution will see significant performance improvement at the cost * of visual artifacting. * @default 'half' */ aoResolution?: TAOConfiguration['aoResolution']; /** * Background color of the map as a string e.g. `#2e2e2e`. */ backgroundColor?: string; /** * The opacity of the initial background color. */ backgroundAlpha?: number; /** * Controls whether antialiasing is on. Defaults to `true`, as long as devicePixelRatio is 1. This is very expensive on high resolution screens. * @default true */ antialias?: TAntialiasConfiguration['antialias']; /** * @experimental * * Controls the antialiasing quality. Greater quality means less artifacts(less aliasing), but worse performance. * @default 'medium' */ antialiasQuality?: TAntialiasConfiguration['antialiasQuality']; disableHover?: boolean; disableZoomOnMapSizeChange?: boolean; loadOptions?: { /** * By default, the SDK will merge all geometries by material to reduce the number of draw calls to the GPU * To rever back to using a single geometry for every polygon, pass `MAP_RENDER_MODE.MULTI_GEOMETRY` */ mapRenderStrategy?: MAP_RENDER_MODE; async?: boolean; zoomOverrides?: { zoomMultiplier?: number; focusZoomFactorPolygon?: number; blueDotFollowingZoomFactor?: number; }; /** * @experimental * * Specify a list of layers that contain outdoor geometry */ outdoorGeometryLayers?: string[]; /** * Use the current polygon objects directly rather than what is stored when rendering the map in CMS. * * Important Considerations: * - When this flag is set to true, the application will use live polygon data, which might not include certain enhancements such as 3D text annotations or automatically generated infill patterns. These features typically depend on the CMS's Render capabilities. * - Opting for live polygons means the system will not utilize the pre-processed optimized polygon data that is available through the CMS's rendering pipeline. * - This option is useful for applications requiring the most up-to-date representation of polygon data but may result in a less detailed visual representation due to the absence of certain rendered features. * * Use this option with caution, understanding the trade-offs between real-time update and visual detail. */ useLivePolygons?: boolean; }; /** * Settings for experimental vector tile -based outdoor context * Requires `multiBufferRendering` to be enabled. * @experimental */ outdoorView?: TOutdoorViewOptions & { enabled?: boolean; }; /** * @experimental */ dynamicFocus?: { /** * The Dynamic Focus Map to always be visible. */ baseMap?: MappedinMap; /** * Mercator Zoom level where the indoors are fully visible. */ indoorsFullyVisibleZoomLevel?: number; /** * Mercator Zoom level when the outdoors geometry is fully visible. */ buildingFullyVisibleZoomLevel?: number; /** * Level at which the map is "set", and colliders become visible. */ setMapAtZoomLevel?: number; /** * Whether we should preload the default maps of each building. * This will incur a cost up-front, but make transitions smoother. * @default false */ preloadDefaultMaps?: boolean; /** * An array of base map layer names which should remain active when the focus has changed to a building map. * This could include outdoor {@link FloatingLabel}s or {@link Marker}s that are attached to the base map. */ keepLayersActiveOnBaseMap?: string[]; }; /** * @experimental * Defines which layers are visible or adds zoom based opacity interpolation */ layerGroups?: { /** * Layer names */ layers: string[]; /** * Whether the layer should be visible */ visible?: boolean; /** * Interpolates opacity based on zoom level * * Note: Mercator zoom level values are clamped * * @example * 1. Simple interpolation * * Keep layers visible until zoom level 17, then fade out until zoom level 18 when they become invisible * * ```ts * opacityInterpolation: [ * { * zoomLevel: 17, * opacity: 1 * }, * { * zoomLevel: 18, * opacity: 0, * } * ] * ``` * * @example * 2. Advanced interpolation * * The following will keep the layers invisible until zoom level 18, keep them visible until zoom level 18, * and begin fading and invisible at zoom level 19 * * `inputZoomLevel` defines Mercator zoom level steps which correspond with `outputOpacity` opacity values * * ```ts * opacityInterpolation: { * inputZoomLevel: [17, 18, 18, 19], * outputOpacity: [0, 1, 1, 0], * } * ``` * */ opacityInterpolation?: { /** * Clamped mercator zoom value in range [0, 22] */ zoomLevel: number; /** * Opacity output value in range [0, 1] */ opacity: number; }[] | { /** * Clamped mercator zoom values in range [0, 22] */ inputZoomLevel: number[]; /** * Opacity output values in range [0, 1] */ outputOpacity: number[]; }; }[]; /** * First map to be rendered. */ firstMap?: MappedinMap | string; /** * @experimental * * Multi-buffer rendering should improve performance but may cause issues on older GPUs/browsers * @default false */ multiBufferRendering?: boolean; /** * @experimental * * Journey path will be visible through other objects. Note: this is on by default, but requires the * `multiBufferRendering` option (which is off by default) to be turned on. * @default true */ xRayPath?: boolean; /** * True if the `opacity` argument to `setBackgroundColor` should be considered. * @default true */ alpha?: boolean; floatingLabels?: { iconSizeInterpolation?: { nearZoomLevel: number; farZoomLevel: number; nearScale: number; farScale: number; }; }; onWebGLContextCreationError?: () => void; onWebGLContextLost?: () => void; onWebGLContextRestored?: () => void; onWebGLRendererError?: () => void; }; export type TShowVenueOptions = { /** * Enable shading of bottoms of geometry along with outlines to make geometry stand out. */ shadingAndOutlines?: boolean; /** * @experimental * * Enable ambient occlusion. Only works in single buffer mode and when device supports WebGL2. * @default false */ aoEnabled?: TAOConfiguration['aoEnabled']; /** * @experimental * * Change the quality of ambient occlusion in the scene. Greater quality means less noise, but worse performance. * @default 'medium' */ aoQuality?: TAOConfiguration['aoQuality']; /** * @experimental * * Change the resolution of ambient occlusion. Lower resolution will see significant performance improvement at the cost * of visual artifacting. * @default 'full' */ aoResolution?: TAOConfiguration['aoResolution']; /** * @internal * * Ambient occlusion configuration passed from the mobile SDKs. */ ambientOcclusionConfig?: TAOConfiguration; /** * Sets the initial background color of the map, including while loading. * */ backgroundColor?: string; /** * The opacity of the initial background color. */ backgroundAlpha?: number; /** * Whether or not to display default styled Floating Labels initially */ labelAllLocationsOnInit?: boolean; /** * The id of the first map to show on map load */ firstMapId?: string; loadOptions?: { /** * Set the map render strategy in order to optimize FPS * * @beta */ mapRenderStrategy?: MAP_RENDER_MODE; /** * Use the current polygon objects directly rather than what is stored when rendering the map in CMS. * * Important Considerations: * - When this flag is set to true, the application will use live polygon data, which might not include certain enhancements such as 3D text annotations or automatically generated infill patterns. These features typically depend on the CMS's Render capabilities. * - Opting for live polygons means the system will not utilize the pre-processed optimized polygon data that is available through the CMS's rendering pipeline. * - This option is useful for applications requiring the most up-to-date representation of polygon data but may result in a less detailed visual representation due to the absence of certain rendered features. * * Use this option with caution, understanding the trade-offs between real-time update and visual detail. */ useLivePolygons?: boolean; }; /** * @experimental * Enable outdoor view. Requires multi-buffer rendering to be enabled */ outdoorView?: TOutdoorViewOptions & { enabled?: boolean; }; /** * @experimental * Enable multi-buffer rendering * * Multi-buffer rendering should improve performance but may cause issues on older GPUs/browsers * @default false */ multiBufferRendering?: boolean; /** * @experimental * Journey path will be visible through other objects. Note: this is on by default, but requires the * `multiBufferRendering` option (which is off by default) to be turned on. * @default true */ xRayPath?: boolean; /** * @internal * Anti alias configuration passed from the mobile SDKs. */ antialiasConfig?: TAntialiasConfiguration; /** * Controls whether antialiasing is on. Defaults to `true`, as long as devicePixelRatio is 1. This is very expensive on high resolution screens. * @default true */ antialias?: TAntialiasConfiguration['antialias']; /** * @experimental * * Controls the antialiasing quality. Greater quality means less artifacts(less aliasing), but worse performance. * @default 'medium' */ antialiasQuality?: TAntialiasConfiguration['antialiasQuality']; }; export type TMapViewOptionsLegacy = { /** * Background color of the map as a string e.g. `"#2e2e2e"`. */ backgroundColor?: string; /** * The opacity of the initial background color. */ backgroundAlpha?: number; /** * Controls whether antialiasing is on. Defaults to true, as long as devicePixelRatio is 1. This is very expensive on high resolution screens. * @default true */ antialias?: boolean; markerWorldIslandSplit?: boolean; /** * A callback executed with the 3D files have been downloaded for the first Map, and are starting to load into memory. The MapView is fully functional at this point, but some things will still be popping in. */ onDataLoaded?: (venue?: Mappedin) => void; /** * A callback executed when the first map is fully loaded. This means onDataLoaded has already been fired (if specified) and then all the textures and other resources have finished popping in. */ onFirstMapLoaded?: (venue?: Mappedin) => void; /** * If you would like to completely disable the hover effect (if you are on a touch screen for example), set this to true. * @default false; */ disableHover?: boolean; disableZoomOnMapSizeChange?: boolean; loadOptions?: { mode?: 'json' | 'obj'; zoomOverrides?: { zoomMultiplier: unknown; focusZoomFactorPolygon: unknown; }; }; /** * First map to be rendered */ firstMap?: MappedinMap | string; /** * @beta */ multiBufferRendering?: boolean; /** * True if the `opacity` argument to `setBackgroundColor` should be considered. * @default true */ alpha?: boolean; onWebGLContextCreationError?: () => void; onWebGLContextLost?: () => void; onWebGLContextRestored?: () => void; onWebGLRendererError?: () => void; }; /** * Control how a flat label looks */ export type TFlatLabelOptions = { text: string; /** * Set this if you want to label an arbitrary part of the Map. You will need to specify height as well. */ canvasBounds?: { /** * The x coordinate for the TextLabel anchor. */ x: number; /** * The y coordinate for the TextLabel anchor. */ y: number; /** * The horizontal space we have to fit the TextLabel. */ width: number; /** * The vertical space we have to fit the TextLabel. */ height: number; /** * Whether the TextLabel should be anchored against the (x,y), or the opposite (horizontal) side of the box, or in the middle. It is * always vertically centered. */ align: 'left' | 'right' | 'center'; }; }; /** * Control how a flat label looks */ export type TFlatLabelAppearance = { /** * By default this is the upper bounds of the Polygon. If you don't have a Polygon, or want a custom height for some reason, you can set this. */ height?: number; /** * The amount of space to leave before starting the text in pixels * @default 5 */ margin?: number; /** * Optional color in hexadecimal string e.g. `#2e2e2e`. */ color?: string; /** * Optional hover color in hexadecimal string e.g. `#2e2e2e`. */ hoverColor?: string; /** * Size of the font in pixels. * @default 12 */ fontSize?: number; /** * A CSS style string font, e.g. "sans-serif". You can specify your own font via @font-face rule with a font family, and then include that here. */ font?: string; /** * The minimum percentage we can shrink the label to if it won't fit within the bounds at 100%. If it doesn't fit at that level, it won't be created. * @default 0.25 */ scaleMin?: number; /** * How much to decrement the scale each time it doesn't fit, so we don't end up with too many different font sizes on screen at once. If you are only labeling a few {@link MappedinPolygon}s rather than everything, * you can set this and and scaleMin to 0.1 to fit everything except really long names perfectly. * @default 0.25 */ scaleStep?: number; }; export type TFloatingLabelPolygonOptions = { text: string; scale?: number; /** * The rank of the FloatingLabel used when comparing colliders to determine which should be shown. */ rank?: COLLISION_RANKING_TIERS | number; /** * Customize the appearance of the Floating Labels and their pins. */ appearance?: TFloatingLabelAppearance; /** * Group analytics based ranking by {@link MappedinCategory.sortOrder} value. * @default false */ groupRankingByCategory?: boolean; }; export type TAddFlatLabelOptions = { appearance?: TFlatLabelAppearance; }; /** * Options for creating a new {@link FloatingLabels | FloatingLabel} with {@link FloatingLabels.add}. */ export type TAddFloatingLabelOptions = { scale?: number; /** * The rank of the FloatingLabel used when comparing colliders to determine which should be shown. */ rank?: COLLISION_RANKING_TIERS | number; /** * Customize the appearance of the FloatingLabel and its pin */ appearance?: TFloatingLabelAppearance; /** * Group analytics based ranking by {@link MappedinCategory.sortOrder} value * @default false */ groupRankingByCategory?: boolean; /** * Whether the FloatingLabel should be clickable and included in {@link E_SDK_EVENT.CLICK} events. * @default false */ interactive?: boolean; /** * Optional layer to attach the FloatingLabel to. * If not provided, this will be empty or the layer of the {@link MappedinPolygon} that the label is attached to. */ layer?: string; /** * @internal */ id?: string; }; export type TLabelAllLocationCommonOptions = { /** * Exclude specific location types from labeling */ excludeTypes?: string[]; /** * A custom sort function to use for sorting locations */ sortFunction?: (a: MappedinLocation, b: MappedinLocation) => number; /** * Locations to label - otherwise, use current venue object */ locations?: MappedinLocation[]; /** * Custom translation map for location states */ translationMap?: { [key in string]: string; }; /** * Display label despite the {@link MappedinPolygon} having an image on it. Often these images represent store logos. * @default false */ createDespiteImage?: boolean; }; /** * @deprecated */ export type TLabelAllLocationFloatingLabelOptions = TLabelAllLocationCommonOptions & { /** * Use Flat Labels * @default false */ flatLabels?: false | undefined; /** * Customize the appearance of the Floating Labels and their pins */ appearance?: TFloatingLabelAppearance; /** * Make label interactive */ interactive?: boolean; }; /** * @deprecated * * Use {@link FlatLabels.add} or {@link FloatingLabels.add} to get more fine tuned control when labelling * all locations. */ export type TLabelAllLocationFlatLabelOptions = TLabelAllLocationCommonOptions & { /** * Use Flat Labels * @default false */ flatLabels: true; appearance?: TFlatLabelAppearance; }; /** * Options for controlling bulk location labelling */ export type TFloatingLabelAllLocationsOptions = TLabelAllLocationCommonOptions & { appearance?: TFloatingLabelAppearance; interactive?: boolean; /** * Group analytics based ranking by {@link MappedinCategory.sortOrder} value * @default false */ groupRankingByCategory?: boolean; }; /** * Options for controlling bulk location labelling */ export type TFlatLabelAllLocationsOptions = TLabelAllLocationCommonOptions & { appearance?: TFlatLabelAppearance; }; /** * @internal */ export type changeListenerFn = (update: PAYLOAD) => void; /** * Information about a clicked {@link Marker} or Tooltip */ export type ClickEventPayload = { /** * Id of the Marker or Tooltip that was clicked */ id: string; /** * Marker or Tooltip node (if available) */ node?: MappedinNode; /** * Marker or Tooltip coordinate (if available) */ coordinate?: MappedinCoordinate; }; /** * Information about a clicked {@link FloatingLabels | FloatingLabel} */ export type FloatingLabelClickEventPayload = { text?: string; } & Omit; export type TAntialiasConfiguration = { antialias?: boolean; antialiasQuality?: 'low' | 'medium' | 'high' | 'ultra'; }; export type TAOConfiguration = { /** * Enable ambient occlusion. Only works in single buffer mode and when device supports WebGL2. * @default false */ aoEnabled?: boolean; /** * Change the quality of ambient occlusion in the scene. Greater quality means less noise, but worse performance. * * The quality modes are as follows: *Temporal stability refers to how consistent the AO is from frame to frame - it's important for a smooth experience.* | Quality Mode | AO Samples | Denoise Samples | Denoise Radius | Best For |:---:|:---:|:---:|:---:|:---:| | Performance (Less temporal stability, a bit noisy) | 8 | 4 | 12 | Mobile, Low-end iGPUs and laptops | | Low (Temporally stable, but low-frequency noise) | 16 | 4 | 12 | High-End Mobile, iGPUs, laptops | | Medium (Temporally stable and barely any noise) | 16 | 8 | 12 | High-End Mobile, laptops, desktops | | High (Significantly sharper AO, barely any noise) | 64 | 8 | 6 | Desktops, dedicated GPUs | | Ultra (Sharp AO, No visible noise whatsoever) | 64 | 16 | 6 | Desktops, dedicated GPUs| Generally, half-res mode at "Ultra" quality is slightly slower than full-res mode at "Performance" quality, but produces significantly better results. If you wish to make entirely custom quality setup, you can manually change `aoSamples`, `denoiseSamples` and `denoiseRadius`. * * @default 'medium' */ aoQuality?: 'performance' | 'low' | 'medium' | 'high' | 'ultra'; aoSamples?: number; /** * Controls the radius/size of the ambient occlusion in world units. Should be set to how far you want the occlusion to extend from a given object. * Set it too low, and AO becomes an edge detector. Too high, and the AO becomes "soft" and might not highlight the details you want. */ aoRadius?: number; denoiseSamples?: number; denoiseRadius?: number; /** * A purely artistic control for the intensity of the AO has the effect of darkening areas with more ambient occlusion. * Useful to make the effect more pronounced. An intensity of 2 generally produces soft ambient occlusion that isn't too noticeable, * whereas one of 5 produces heavily prominent ambient occlusion. */ intensity?: number; denoiseIterations?: number; renderMode?: number; /** * The color of the ambient occlusion. By default, it is black, but it can be changed to any color to offer a crude approximation of global illumination. * Recommended in scenes where bounced light has a uniform "color", for instance a scene that is predominantly lit by a blue sky. * The color is expected to be in the sRGB color space, and is automatically converted to linear space for you. Keep the color pretty dark for sensible results. * * Color formats:\ * RGB String: `rgb(255, 0, 0)` or `rgb(100%, 0%, 0%)`\ * HSL String: `hsl(0, 100%, 50%)`\ * X11 color name - all 140 color names are supported. Note the lack of CamelCase in the name: `skyblue` */ color?: string; /** * Should be automatically set to the correct value. If you are getting washed out colors, try setting `gammaCorrection` to false, and if you are getting dark colors, try setting it to true. */ gammaCorrection?: boolean; logarithmicDepthBuffer?: boolean; /** * When screenSpaceRadius is set to true, the `aoRadius` parameter represents the size of the ambient occlusion effect in pixels (recommended to be set between 16 and 64). * The `distanceFalloff` parameter becomes a ratio, representing the percent of the screen space radius at which the AO should fade away - it should be set to 0.2 in most cases, * but it accepts any value between 0 and 1 (technically even higher than 1, though that is not recommended). */ screenSpaceRadius?: boolean; /** * Use half-resolution" mode for performance-critical applications. This will cause the AO to be calculated at half the resolution of the screen, and then upscaled to the full resolution. * This is a great way to get a performance boost (generally 2x-4x) at the cost of some quality (the AO will lack fine details and temporal stability will be slightly reduced). * @default 'full' */ aoResolution?: 'half' | 'full'; /** * The half `aoResolution` mode uses depth-aware upscaling by default. * The AO effect looks bad without depth-aware upscaling, so it is not recommended to disable it. * However, if performance is truly that critical, you can do so by setting `depthAwareUpsampling` to false. */ depthAwareUpsampling?: boolean; /** * It is recommended to not change this value, otherwise rendering issues may occur. */ autoRenderBeauty?: boolean; }; export type TMapClickEvent = { /** * The latitude / longitude of where the user clicked the map. * Both components may be NaN if unable to compute these components. */ position: { latitude: number; longitude: number; }; /** * A list of {@link MappedinPolygon}s corresponding to every polygon that a user's * click passed through. These are in order of first to last intersected. * Will be empty if no interactive polygons were clicked. */ polygons: MappedinPolygon[]; /** * A list of {@link MappedinMap}s corresponding to every map that a user's * click passed through. These are in order of first to last intersected. * Will be empty if no maps were clicked. */ maps: MappedinMap[]; /** * Indicates whether the user clicked close to the Blue Dot object on the * map, if present. If Blue Dot is disabled, this will always be false. */ nearBlueDot: boolean; /** * Information about the {@link FloatingLabels} that a user's click passed through. Will be empty if no {@link FloatingLabels} were clicked. */ floatingLabels: FloatingLabelClickEventPayload[]; /** * Information about the {@link Marker}s that a user's click passed through. Will be empty if no {@link Marker}s were clicked. */ markers: ClickEventPayload[]; /** * Information about the Tooltips that a user's click passed through. Will be empty if no Tooltips were clicked. */ tooltips: ClickEventPayload[]; /** * A list of {@link Path}s that a user's click passed through. These are in order of first * to last intersected. Will be empty if no {@link Path}s were clicked. */ paths?: Path[]; }; /** * Arguments that get passed to listeners of an {@link E_SDK_EVENT}. */ export type E_SDK_EVENT_PAYLOAD = { [E_SDK_EVENT.CLICK]: TMapClickEvent; [E_SDK_EVENT.STATE_CHANGE]: STATE; [E_SDK_EVENT.POLYGON_CLICKED]: MappedinPolygon; [E_SDK_EVENT.NOTHING_CLICKED]: undefined; [E_SDK_EVENT.OUTDOOR_VIEW_LOADED]: undefined; [E_SDK_EVENT.MAP_CHANGED]: MappedinMap; [E_SDK_EVENT.MAP_CHANGED_WITH_REASON]: { map: MappedinMap; reason?: E_MAP_CHANGED_REASON; }; [E_SDK_EVENT.STACKED_MAPS_STATE_CHANGE]: STACKED_MAPS_STATE; }; /** * Arguments that get passed to listeners of an {@link E_BLUEDOT_EVENT}. */ export type E_BLUEDOT_EVENT_PAYLOAD = { /** * Emitted when the BlueDot position updates */ [E_BLUEDOT_EVENT.POSITION_UPDATE]: TBlueDotPositionUpdate; /** * Emitted when the BlueDot state changes */ [E_BLUEDOT_EVENT.STATE_CHANGE]: TBlueDotStateChange; }; /** * Arguments that get passed to listeners of an {@link E_CAMERA_EVENT}. */ export type CAMERA_EVENT_PAYLOAD = { [E_CAMERA_EVENT.USER_INTERACTION_START]: void; [E_CAMERA_EVENT.USER_INTERACTION_END]: void; [E_CAMERA_EVENT.CHANGED]: { tilt: number; position: MappedinCoordinate; zoom: number; rotation: number; }; /** * @deprecated Use E_CAMERA_EVENT.CHANGED instead */ [E_CAMERA_EVENT.POSITION_CHANGED]: MappedinCoordinate; /** * @deprecated Use E_CAMERA_EVENT.CHANGED instead */ [E_CAMERA_EVENT.ZOOM_CHANGED]: number; /** * @deprecated Use E_CAMERA_EVENT.CHANGED instead */ [E_CAMERA_EVENT.ROTATION_CHANGED]: number; /** * @deprecated Use E_CAMERA_EVENT.CHANGED instead */ [E_CAMERA_EVENT.TILT_CHANGED]: number; }; export type { TOutdoorViewOptions, TOutdoorViewOptionsWithHeaders, TOutdoorViewOptionsWithAuthURL }; export type { default as BlueDotController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/BlueDotController'; export type { default as Journey } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Journey'; export type TStackedMapsOptions = { /** * The vertical distance between maps in overview, in metres. When set to 'auto', will automatically determine * the ideal vertical spacing based on map content and dimensions. * @default 50 */ verticalDistanceBetweenMaps?: number | 'auto'; /** * Whether to show map level labels in overview. * @default true */ mapLabels?: boolean; /** * Whether to show only Journey maps in the stack if a Journey is active and the current map is part of the Journey. * @default true */ prioritizeJourneyMaps?: boolean; }; export interface IPositionUpdater extends IPubSub { /** * Function that emits position updates */ update: (position: TGeolocationObject) => void; /** * Optional function to start listening */ start?: (options?: any) => void; /** * Optional function to stop listening */ stop?: () => void; /** * Function that emits an error in retrieving position */ throwError?: (err: string) => void; } export class PositionUpdater extends PubSub implements IPositionUpdater { update: (position: TGeolocationObject) => void; throwError: (err: any) => void; } export type TWatermarkPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'center' | 'top' | 'bottom' | 'left' | 'right'; export type TShowWatermarkOptions = { /** * Padding in pixels. Can be a number or an object with top, right, bottom, and left properties. * @default 16 * @example * ```ts * // Watermark with 20 pixels of padding on all sides * __showWatermark({ * padding: 20, * }); * ``` * @example * ```ts * // Watermark with unique top, right, bottom, left padding * __showWatermark({ * padding: { * top: 10, * right: 20, * bottom: 30, * left: 40, * }, * }); * ``` */ padding?: number | { top?: number; right?: number; bottom?: number; left?: number; }; /** * Position of the watermark on the screen. * @default 'bottom-left' */ position?: TWatermarkPosition; /** * Show only the Mappedin icon without text. * @default false */ iconOnly?: boolean; /** * Scale of the watermark between 0.5 and 1.5. * @default 1 */ scale?: number; /** * Callback when the watermark is clicked. */ onClick?: () => void; }; } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue' { import type { TAllGetVenueOptions, TGetVenueOptions, TGetVenueOptionsInternal, TVenueMetadata, ThingsOption } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.types'; import { Mappedin } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin'; import { defaultThings } from '@mappedin/react-native-sdk/sdks/packages/get-venue/default-things'; import { GET_VENUE_EVENT } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; /** * This is how we can avoid bundling in node-fetch (via isomorphic fetch), * which keeps popping up in security advisories * This is a pattern that most isomorphic libraries appear to use, * where when running in node, you can pass your own fetch function * as one is not provided by Node.js. * */ export function isomorphicFetch(): Window['fetch']; /** * Overwrite the internal `fetch` function with your own. Typically for use in Node.js and Jest. * * @example * ```js * const { getVenue } = require("@mappedin/mappedin-js/lib/node/index"); * setFetchFn(require("node-fetch-commonjs")); * ``` * */ export function setFetchFn(fetchFn: any): void; /** Classes */ export { MappedinCollectionType, MappedinNavigatable, MappedinNode, MappedinLocation, MappedinPolygon, MappedinCategory, MappedinDirections, MappedinDestinationSet, MappedinVortex, MappedinVenue, MappedinRankings, MappedinEvent, MappedinLocationState, MappedinMap, MappedinCoordinate, MappedinMapGroup, findPreferredLanguage, Mappedin, } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; /** * @internal * @hidden * * Export this only so our internal pre-built products can use it. We don't want to document it for external developers. */ export { default as CustomerAnalytics } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.CustomerAnalytics'; export type { TMappedinDirective } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinDirections'; export type { IDirectionsResult } from '@mappedin/react-native-sdk/sdks/packages/navigator'; export type { TOperationHoursMap } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinLocation'; export type { TMappedinCoordinateOptions } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinCoordinate'; export type { TDirectionToOptions, TTHINGS, TAccessors } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; export type { ThingsOption }; export { OfflineSearch } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.OfflineSearch'; export type { TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineAllSearchMatch, TMappedinOfflineSearchAllOptions, } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.OfflineSearch'; export { defaultThings }; /** API data types */ export type { TLocationType, TNode, TImage, TLogo, TGalleryImage, TPhone, TSocial, TColor, TVortex, TPicture, TOpeningHours, TSiblingGroup, TState, TCategory, TEvent, TGeoReference, TMap, TMapGroup, TBuilding, TLocation, TPolygon, TPolygonRanking, TVenue, TMappedinAPI, } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.API.types'; export type { TGetVenueOptions } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.types'; import { MAP_RENDER_MODE } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.types'; import { ParsedMVF } from '@mappedin/mvf'; export { MAP_RENDER_MODE, GET_VENUE_EVENT }; /** * @internal */ export function parseOptions(options: T): TGetVenueOptionsInternal; /** * @internal */ export function getVenueMVF(userOptions: TGetVenueMVFOptions): Promise; /** * @experimental * Get venue data for a map created in Mappedin Maker. * @param userOptions * @example * ```ts * const mappedin = await getVenueMaker({ * key: '', * secret: '', * mapId: '', * }); * ``` * @returns {@link Mappedin} object with data from the Maker map. */ export function getVenueMaker(userOptions: TGetVenueMakerOptions): Promise; /** * Get Venue Data for a Mappedin Venue */ export function getVenue(userOptions: TGetVenueOptions): Promise; export function getVenueMetadata(userOptions: TGetVenueOptions): Promise; /** * @internal */ export function __setGetVenueMock(fn: any): void; export type TGetVenueBundleOptions = TGetVenueOptions & { bundleBaseUri?: string; version?: string; /** * Parse bundle and convert images to blobs. Disabled in React Native * @private */ shouldPopulateBundledImagesAsBlobs?: boolean; }; /** @internal */ export type TGetVenueMVFOptions = TGetVenueBundleOptions & { onMVFParsed?: (mvf: ParsedMVF) => void; /** * Override initial MVF data */ override?: Partial>; }; /** * @experimental * Options for {@link getVenueMaker}. */ export type TGetVenueMakerOptions = { /** * Maker auth key. */ key: string; /** * Maker auth secret. */ secret: string; /** * Maker map ID. */ mapId: string; /** * Optionally provide a custom base URL for the Maker map API request. */ bundleBaseUri?: string; /** * Optionally provide a custom base URL for the Maker auth token request. */ authBaseUri?: string; /** * Whether or not to emit analytics events. * @default true */ emitAnalyticsEvents?: boolean; /** * Callback for when the Maker map data has been fetched and parsed as Mappedin Venue Format (MVF) data. This occurs before the {@link Mappedin} object is hydrated. * @param mvf Parsed MVF data. */ onMVFParsed?: (mvf: ParsedMVF) => void; }; /** * @deprecated * Fetching an offline Venue bundle * It is possible to download the venue bundle with all assets built in, which allows for caching/offline solutions. * Note 1: This requires enabling from Mappedin's Customer Solutions team. * Note 2: This may behave a lot slower for large venues, especially those with many images. We are actively working on improving load times. */ export function getVenueBundle(userOptions: TGetVenueBundleOptions): Promise; /** * Get the bundle URL and updated_at time. * @internal */ export function getVenueBundleURL(userOptions: TGetVenueBundleOptions): Promise<{ url: string; updated_at: string; }>; /** * Download a bundle and return a Mappedin instance * @internal */ export function downloadBundle(userOptions: TGetVenueBundleOptions, { url, updated_at }: { url: any; updated_at: any; }): Promise; /** * Get the bundle URL and updated_at time. * @internal */ export function getVenueMVFURL(userOptions: TGetVenueBundleOptions): Promise<{ url: string; updated_at: string; }>; /** * @internal */ export function downloadVenueBundleMVF(options: TGetVenueBundleOptions): Promise; /** * Represents the options for getting an access token. * * @internal */ export type TGetAccessTokenOptions = Pick; /** * Get an access token. * * @param userOptions */ export function getMakerAccessToken(userOptions: TGetAccessTokenOptions): Promise<{ access_token: string; expires_in: number; }>; export function getMakerBundleURL(userOptions: TGetVenueMakerOptions, token: string): Promise<{ url: string; updated_at: string; }>; export function downloadMVF(userOptions: TGetVenueMakerOptions, accessToken: string): Promise; /** * Returns a {@link Mappedin} object hydrated with JSON data. * @param {string|Object} mappedinSerializableData A JSON string or object representing a venue. * @param {boolean} shouldPopulateBundledImagesAsBlobs * @returns {Mappedin} A new Mappedin object with data from the mappedinSerializableData parameter. */ export function hydrateVenue(mappedinSerializableData: any, shouldPopulateBundledImagesAsBlobs?: boolean): Promise; /** * @internal * Returns a {@link Mappedin} object hydrated with MVF data. */ export function hydrateVenueMVF(mvfData: ParsedMVF): Promise; } declare module '@mappedin/react-native-sdk/sdks/packages/common/random-id' { /** * Returns a UUIDv4-like ID without relying on a CSPRNG as we don't need it for these purposes. * @hidden */ export const randomId: () => string; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.enums' { export enum GEOLOCATION_STATUS { SUCCESS = 0 } export enum COLLISION_RANKING_TIERS { /** @internal */ OPTIONAL_MINIMUM = 0, /** @internal */ OPTIONAL_MAXIMUM = 1, MEDIUM = 2, HIGH = 3, /** * Always display collider, regardless of collisions */ ALWAYS_VISIBLE = 4 } export enum E_BLUEDOT_STATE_REASON { /** * Positions we are receiving indicate we are outside the venue */ OUTSIDE_MAP = 0, /** * BlueDot is enabled, but we haven't received any positions */ NO_POSITIONS_PROVIDED = 1, /** * Web Only: Error returned by geolocation provider */ GEOLOCATION_PROVIDER_ERROR = 2, /** * Errors provided by custom location providers */ CUSTOM_GEOLOCATION_PROVIDER_ERROR = 3 } /** What we currently know about the user's position and how confident we are. */ export enum E_BLUEDOT_STATE { /** * Not listening to Blue Dot position updates */ NOT_LISTENING = 0, /** * Listenign for listening to position updates but have not yet received a position */ LISTENING = 1, /** * Received relevant positions and user is in the venue */ HAS_POSITION = 2, /** * We've received a relevant position, and we have enough information to determine * which floor the user is on - either because we received a floor level, the venue * only has one floor or we're allowing implicit floor level detection. */ HAS_INDOOR_POSITION = 3, /** * We are uncertain about the user's position, likely because we haven't received * a relevant position in a while. Blue Dot will be rendered grey to indicate uncertainty of the actual position. */ LOCATION_UNCERTAIN = 4 } /** * Visual States of the BlueDot */ export enum E_BLUEDOT_MARKER_STATE { /** * Blue Dot is hidden */ HIDDEN = 0, /** * Blue Dot is transparent indicating the position is on a different floor */ GHOST = 1, /** * Blue Dot is visible and opaque indicating accurate positioning on the current floor */ NORMAL = 2, /** * Blue Dot is grayed out due to uncertainty about user's location, most likely due to not receiving recent position updates. */ UNCERTAIN = 3 } /** * @enum The state of the {@link MapView}. */ export enum STATE { /** * The map is in exploration mode where the user controls the camera position. */ EXPLORE = "explore", /** * Follows user's current location by keeping the camera centered on the Blue Dot. */ FOLLOW = "follow", /** * FOLLOW WITH ROTATION provides turn by turn navigation while following user's location */ STACKED = "STACKED" } export enum MARKER_ANCHOR { CENTER = 0, TOP = 1, LEFT = 2, BOTTOM = 3, RIGHT = 4 } export enum E_SDK_EVENT { /** * Emitted when the map is clicked or tapped on a touch screen. */ CLICK = "CLICK", /** * Emitted when the {@link STATE | SDK state} changes. */ STATE_CHANGE = "STATE_CHANGE", /** * @deprecated * Use E_SDK_EVENT.CLICK instead. Emitted when an interactive {@link MappedinPolygon | polygon} is clicked */ POLYGON_CLICKED = "POLYGON_CLICKED", /** * @deprecated * Use E_SDK_EVENT.CLICK instead. Emitted when nothing (outside of interactive polygons) is clicked */ NOTHING_CLICKED = "NOTHING_CLICKED", /** * Emitted when the map is changed */ MAP_CHANGED = "MAP_CHANGED", /** * Emitted when the map is changed, plus the context in which it was changed. This is typically so developers can * determine why the map was changed, such as a user clicking a connection, or the blue dot detecting a floor change, among others. * See {@link E_MAP_CHANGED_REASON}. */ MAP_CHANGED_WITH_REASON = "MAP_CHANGED_WITH_REASON", /** * Emitted when the outdoor view is ready. All currently requested tiles have loaded, and all fade and transition * animations have completed. {@link showVenue} is resolved when the indoor map is ready even if the outdoor tiles are not yet loaded. * Use this event to create a loading screen that ensures outdoor view is fully loaded and rendered. * @experimental */ OUTDOOR_VIEW_LOADED = "OUTDOOR_VIEW_LOADED", /** * Emitted when the stacked maps state changes */ STACKED_MAPS_STATE_CHANGE = "STACKED_MAPS_STATE_CHANGE" } /** * @enum */ export enum E_BLUEDOT_EVENT { /** * Emitted when the BlueDot position changes */ POSITION_UPDATE = "POSITION_UPDATE", /** * Emitted when the BlueDot state changes */ STATE_CHANGE = "STATE_CHANGE" } /** * @enum */ export enum E_CAMERA_EVENT { USER_INTERACTION_START = "USER_INTERACTION_START", USER_INTERACTION_END = "USER_INTERACTION_END", /** * @deprecated Use E_CAMERA_EVENT.CHANGED instead */ ZOOM_CHANGED = "ZOOM_CHANGED", /** * @deprecated Use E_CAMERA_EVENT.CHANGED instead */ ROTATION_CHANGED = "ROTATION_CHANGED", /** * @deprecated Use E_CAMERA_EVENT.CHANGED instead */ TILT_CHANGED = "TILT_CHANGED", /** * @deprecated Use E_CAMERA_EVENT.CHANGED instead */ POSITION_CHANGED = "POSITION_CHANGED", /** * Fires when camera state changes, including position, tilt, zoom and rotation */ CHANGED = "CHANGED" } export enum E_CAMERA_DIRECTION { UP = "up", DOWN = "down", LEFT = "left", RIGHT = "right" } export enum SAFE_AREA_INSET_TYPE { PIXELS = "pixels", PORTIONS = "portions" } export const ANIMATION_TWEENS: { linear: any; 'ease-in': any; 'ease-out': any; 'ease-in-out': any; }; export enum CAMERA_EASING_MODE { LINEAR = "linear", EASE_IN = "ease-in", EASE_OUT = "ease-out", EASE_IN_OUT = "ease-in-out" } /** * @experimental */ export enum STACKED_MAPS_STATE { /** * Stacked maps are active, and ready to be expanded */ ACTIVE = "ACTIVE", /** * Stacked maps are inactive, and a single map is displayed at a time */ INACTIVE = "INACTIVE", /** * Stacked maps are expanded, and all maps in a journey are displayed in a stack */ OVERVIEW = "OVERVIEW", /** * Stacked maps are active, but we're viewing a single map in a journey */ ZOOMED_IN = "ZOOMED_IN" } /** * A reason why the SDK changed the map. See {@link E_SDK_EVENT.MAP_CHANGED_WITH_REASON}. */ export enum E_MAP_CHANGED_REASON { /** * When in Dynamic Focus mode, and the user pans or zooms to a map */ DYNAMIC_FOCUS_USER_INTERACTION = "dynamic-focus-user-interaction", /** * When BlueDot is in FOLLOW mode, and the level changes */ BLUE_DOT_LEVEL_TRANSITION = "blue-dot-level-transition", /** * When clicking on the default Journey connection markers */ JOURNEY_CONNECTION_CLICK = "journey-connection-click" } /** * Position Updater Events * @internal */ export enum E_POSITION_UPDATER_EVENT { POSITION_UPDATE = 0, ERROR = 1 } } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/FlatLabels' { import { MappedinPolygon } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import FlatLabelsController from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/FlatLabelsController'; import { TFlatLabelAllLocationsOptions, TAddFlatLabelOptions, TFlatLabelAppearance } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types'; /** * API to add and remove flat labels on the map. */ export interface IFlatLabels { /** * Add a flat label to the polygons associated with all locations on the venue. * The text is automatically determined based on location data. * * ```ts * // Draw red labels on all polygons with a location * mapView.FlatLabels.labelAllLocations({ * appearance: { * color: 'red', * } * }); * ``` * @param options */ labelAllLocations(options?: TFlatLabelAllLocationsOptions): T; /** * Add a flat label to a single polygon. * * ```ts * // Label the apple store with the label "Apple Store" * const location = mapView.venue.locations.find((l) => l.name === "Apple")!; * mapView.FlatLabels.add(location.polygons[0], "Apple Store"); * ``` * * @param polygon The {@link MappedinPolygon} to label. * @param text The text to display on the label. * @param options */ add(polygon: MappedinPolygon, text: string, options?: TAddFlatLabelOptions): T; /** * Remove a flat label from a single polygon. * * ```ts * mapView.FlatLabels.add(polygon, "Label"); * * ... * * // Remove the label currently on this polygon * mapView.FlatLabels.remove(polygon); * ``` * * @param polygon The {@link MappedinPolygon} with a label to remove. */ remove(polygon: MappedinPolygon): T; /** * Remove all flat labels from the venue. * * ```ts * mapView.FlatLabels.add(polygon1, "Label 1"); * mapView.FlatLabels.add(polygon2, "Label 2"); * * ... * * // Remove all labels from all polygons * mapView.FlatLabels.removeAll(); * ``` */ removeAll(): T; /** * Update the appearance attributes of an already-existing label. If the * provided polygon does not have a label already, this is a no-op. * * ```ts * mapView.FlatLabels.setAppearance(polygon, { * color: 'blue', * font: 'times', * }); * ``` * * @param polygon The {@link MappedinPolygon} with a label to update. * @param appearance The new {@link TFlatLabelAppearance} settings to apply to the polygon's label. */ setAppearance(polygon: MappedinPolygon, appearance: TFlatLabelAppearance): T; /** * Set the hover text color for all Flat Labels. To set hover color for all polygons, * see {@link MapView.setHoverColor}. * * ```ts * // Make all flat labels turn red on hover * mapView.FlatLabels.setHoverColorForAll('#ff0000'); * ``` * * @param color A hexidecimal string representing the hover color. */ setHoverColorForAll(color: string): T; } export class FlatLabels implements IFlatLabels { #private; /** * @hidden */ constructor(controller: FlatLabelsController); labelAllLocations(options?: TFlatLabelAllLocationsOptions): void; add(polygon: MappedinPolygon, text: string, options?: TAddFlatLabelOptions): void; remove(polygon: MappedinPolygon): void; removeAll(): void; setAppearance(polygon: MappedinPolygon, appearance: TFlatLabelAppearance): void; setHoverColorForAll(color: string): void; } } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/FloatingLabels' { import { MappedinCoordinate, MappedinNode, MappedinPolygon } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import { TAddFloatingLabelOptions, TFloatingLabelAllLocationsOptions, TFloatingLabelAppearance } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types'; import FloatingLabelsController, { type FloatingLabel } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/FloatingLabelsController'; /** * Helper for handling a generic when the type could be either an array or promise. * * 1. If the type is an array, return the array. * * ```ts * type A = ArrayablePromise // string[]\ * ``` * * 2. If the type is a void promise, return the void promise. * * ```ts * type B = ArrayablePromise> // Promise * ``` * * 3. If the type is a non void promise, return the promise's resolved type wrapped in an array. * * ```ts * type C = ArrayablePromise> // Promise * ``` */ type PromisableArray = T extends Promise ? Promise : T[]; /** * API to add and remove floating labels on the map. */ export interface IFloatingLabels { /** * Add a floating label to one entrance node of each polygons associated with all * locations on the venue. The text is automatically determined based on location data. * * ```ts * // Draw red labels with black outlines on an entrance node of all polygons with a location * mapView.FloatingLabels.labelAllLocations({ * appearance: { * text: { * foregroundColor: 'red', * backgroundColor: 'black', * } * } * }); * ``` * @param options */ labelAllLocations(options?: TFloatingLabelAllLocationsOptions): PromisableArray; /** * Add a floating label to a single polygon or node. When labelling a polygon, * all entrance nodes of that polygon receive a label. * * ```ts * // Label the apple store with the label "Apple Store" * const location = mapView.venue.locations.find((l) => l.name === "Apple")!; * mapView.FloatingLabels.add(location.nodes[0], "Apple Store"); * ``` * * @param polygonOrNode The {@link MappedinPolygon} or {@link MappedinNode} or {@link MappedinCoordinate} to label. * @param text The text to display on the label. * @param options */ add(polygonOrNode: MappedinPolygon, text: string, options?: TAddFloatingLabelOptions): PromisableArray; add(polygonOrNode: MappedinNode | MappedinCoordinate, text: string, options?: TAddFloatingLabelOptions): T; add(polygonOrNode: MappedinPolygon | MappedinNode | MappedinCoordinate, text: string, options?: TAddFloatingLabelOptions): PromisableArray | T; /** * Update the appearance attributes of an already-existing label. If the * provided polygon or node does not have a label already, this is a no-op. * * ```ts * mapView.FloatingLabels.setAppearance(node, { * text: { * size: 25, * } * }); * ``` * * @param polygonOrNode The {@link MappedinPolygon} or {@link MappedinNode} or {@link MappedinCoordinate} with a label to update. * @param appearance The new {@link TFlatLabelAppearance} settings to apply to the polygon's label. */ setAppearance(polygonOrNode: MappedinPolygon | MappedinNode | MappedinCoordinate, appearance: TFloatingLabelAppearance): void; /** * Remove a floating label from a single polygon or node. * * ```ts * mapView.FloatingLabels.add(polygon, "Label"); * * ... * * // Remove the label currently on this polygon's first entrance * mapView.FloatingLabels.remove(polygon.entrances[0]); * ``` * * @param polygonOrNode The {@link MappedinPolygon} or {@link MappedinNode} or {@link MappedinCoordinate} with a label to remove. */ remove(polygonOrNode: MappedinPolygon | MappedinNode | MappedinCoordinate): void; /** * Remove all floating labels from the venue. * * ```ts * mapView.FloatingLabels.add(polygon, "Label 1"); * mapView.FloatingLabels.add(node, "Label 2"); * * ... * * // Remove all labels from all polygons * mapView.FloatingLabels.removeAll(); * ``` */ removeAll(): void; /** * Updates the priority of an existing floating label (or labels, in the case * of a polygon). This controls whether it is preferred over other labels * during collisions. * * ```ts * // Polygon 1's label should always show above polygon 2's label * mapView.FloatingLabels.setPriority(polygon0, 0); * mapView.FloatingLabels.setPriority(polygon1, 1); * ``` * * @param polygonOrNode The {@link MappedinPolygon} or {@link MappedinNode} or {@link MappedinCoordinate} with a label to update. */ setPriority(polygonOrNode: MappedinPolygon | MappedinNode | MappedinCoordinate, priority: number): void; /** * Resets the priority of an existing floating label (or labels, in the case * of a polygon) * * ```ts * mapView.FloatingLabels.setPriority(polygon0, 0); * mapView.FloatingLabels.setPriority(polygon1, 1); * * ... * * // Labels should now behave as they did by default * mapView.FloatingLabels.resetPriority(); * ``` * * @param polygonOrNode The {@link MappedinPolygon} or {@link MappedinNode} or {@link MappedinCoordinate} with a label to update. */ resetPriority(polygonOrNode: MappedinPolygon | MappedinNode | MappedinCoordinate): void; } export class FloatingLabels implements IFloatingLabels { #private; /** * @hidden */ constructor(controller: FloatingLabelsController); labelAllLocations(options?: TFloatingLabelAllLocationsOptions | undefined): FloatingLabel[]; add(polygonOrNode: MappedinPolygon, text: string, options?: TAddFloatingLabelOptions | undefined): FloatingLabel[]; add(polygonOrNode: MappedinNode | MappedinCoordinate, text: string, options?: TAddFloatingLabelOptions | undefined): FloatingLabel; setAppearance(polygonOrNode: MappedinPolygon | MappedinNode | MappedinCoordinate, appearance: TFloatingLabelAppearance): void; remove(polygonOrNode: MappedinPolygon | MappedinNode | MappedinCoordinate): void; removeAll(): void; setPriority(polygonOrNode: MappedinPolygon | MappedinNode | MappedinCoordinate, priority: number): void; resetPriority(polygonOrNode: MappedinPolygon | MappedinNode | MappedinCoordinate): void; } export {}; } declare module '@mappedin/react-native-sdk/sdks/packages/navigator' { import NavigationGraph from '@mappedin/react-native-sdk/sdks/packages/navigator/NavigationGraph'; import Navigator from '@mappedin/react-native-sdk/sdks/packages/navigator/Navigator'; export { ACTION_TYPE, BEARING_TYPE } from '@mappedin/react-native-sdk/sdks/packages/navigator/Directive'; export { Navigator, NavigationGraph }; export type { IDirectionsResult, TSimplifyDirectionsOptions } from '@mappedin/react-native-sdk/sdks/packages/navigator/Navigator'; export { E_MESSAGES } from '@mappedin/react-native-sdk/sdks/packages/navigator/Navigator'; export { E_SDK_LOG_LEVEL, setLoggerLevel } from '@mappedin/react-native-sdk/sdks/packages/common/Mappedin.Logger'; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/CameraController' { import { MappedinNode, MappedinPolygon, MappedinCoordinate } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import type { TAnimationOptions, ICore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { PubSub, CAMERA_EVENT_PAYLOAD, E_CAMERA_EVENT, E_CAMERA_DIRECTION, SAFE_AREA_INSET_TYPE } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; export type TSafeAreaInsets = { top: number; left: number; bottom: number; right: number; type?: SAFE_AREA_INSET_TYPE; }; /** * Things that the camera can be positioned to focus on. */ export type TCameraTargets = { nodes?: MappedinNode[]; polygons?: MappedinPolygon[]; coordinates?: MappedinCoordinate[]; }; /** * Options that change the behaviour of {@link Camera.focusOn} */ export type TFocusOnCameraOptions = { /** * Whether the current zoom level should be changed to better place the targets in view. */ changeZoom?: boolean; /** * The minimum zoom level the camera is allowed to change to when focusing on targets. * Useful to prevent the camera from zooming in too far if the target is a single {@link MappedinNode} * or {@link MappedinCoordinate}. */ minZoom?: number; /** * The maximum zoom level the camera is allowed to change to when focusing on targets. */ maxZoom?: number; /** * Specify the rotation the camera makes during the focusing animation. */ rotation?: number; /** * Specify the tilt the camera makes during the focusing animation. */ tilt?: number; /** * Specify a safe area of the screen only that applies only to this {@link Camera.focusOn} call. * See also {@link Camera.setSafeAreaInsets}. */ safeAreaInsets?: TSafeAreaInsets; /** * Whether {@link Camera.minZoom} and {@link Camera.maxZoom} should be recalculated during the focusing animation. */ updateZoomLimits?: boolean; }; /** * A configuration of the camera in space. */ export type TCameraTransform = { /** * Distance (in meters) from the target */ zoom?: number; /** * Angle (in radians) of the camera to the ground. 0 means the camera is top-down. */ tilt?: number; /** * Angle (in radians) the camera is rotated from north. */ rotation?: number; /** * A position in 3D space. */ position?: MappedinCoordinate | MappedinNode; }; export type TCameraAnimationOptions = TAnimationOptions; /** * The configuration for camera interactions on or off. */ export type TCameraInteractionsSetOptions = { /** * Enable or disable pan controls. */ pan?: boolean; /** * Enable or disable zoom controls. */ zoom?: boolean; /** * Enable or disable rotation and tilt controls. * See {@link Camera.maxTilt} for controlling the range of tilt. */ rotationAndTilt?: boolean; }; /** * The Camera object specifies a view of the map and allows manipulation of that view. * @internal */ class CameraController extends PubSub { #private; core: ICore; currentAnimation?: Promise; /** * * @private */ constructor(core: ICore); get zoom(): number; get rotation(): number; get tilt(): number; get minZoom(): number; set minZoom(meters: number); get maxZoom(): number; set maxZoom(meters: number); get maxTilt(): number; set maxTilt(radians: number); get position(): MappedinCoordinate; interactions: { set: (options: TCameraInteractionsSetOptions) => void; enable: () => void; disable: () => void; }; setSafeAreaInsets(insets: { top: number; left: number; bottom: number; right: number; }): void; convertZoomLevelToAltitude(zoomLevel: number): any; convertAltitudeToZoomLevel(altitude: number): any; getSafeAreaInsets(): import("../../MapView.types").TPadding; /** * Focus the Camera view on a collection of targets and animate to that state. * @returns a Promise that resolves when the animation finishes, or rejects when it is cancelled. */ focusOn(targets: TCameraTargets, options?: TFocusOnCameraOptions & TCameraAnimationOptions): Promise; /** * Set the Camera's view to a new state. */ set(positionOptions: TCameraTransform): void; /** * Animate the Camera's view to smoothly transition to a new state over time. * * @returns a Promise that resolves when the animation finishes, or rejects when it is cancelled. */ animate(config: TCameraTransform, options?: TCameraAnimationOptions): Promise; /** * Moves the Camera view in a relative direction by a given distance in meters. * @returns a Promise that resolves when the translation animation finishes, or rejects when it is cancelled. */ translate(direction: E_CAMERA_DIRECTION, distance: number, options?: TCameraAnimationOptions): Promise; /** * Cancel the currently active Camera animation. */ cancelAnimation(): void; } export default CameraController; } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.enums' { export enum MAP_RENDER_MODE { /** Each polygon, its geometry and mesh are sent to the GPU every render frame. * This was the default rendering mode before 4.0.17 */ MULTI_GEOMETRY = "MULTI_GEOMETRY", /** Polygons' geometries are grouped by material and merged together, resulting in far fewer * draw calls to the GPU. Default rendering mode since 4.0.17 */ SINGLE_GEOMETRY = "SINGLE_GEOMETRY" } export enum GET_VENUE_EVENT { LANGUAGE_CHANGED = 0 } export enum MappedinCollectionType { CATEGORY = "categories", EVENT = "events", LOCATION = "locations", MAPGROUP = "mapGroups", MAP = "maps", NODE = "nodes", POLYGON = "polygons", VORTEX = "vortexes" } } declare module '@mappedin/react-native-sdk/wrappers/common/events' { export enum EVENT { SET_DEBUG_FLAGS = "SET_DEBUG_FLAGS", LOAD_VENUE = "LOAD_VENUE", SHOW_VENUE = "SHOW_VENUE", SET_COOKIE = "SET_COOKIE", CLEAR_BUNDLE_CACHE = "CLEAR_BUNDLE_CACHE", UPDATE_GEOLOCATION = "UPDATE_GEOLOCATION", /** * MapView */ SET_MAP = "SET_MAP", MAP_CHANGED = "MAP_CHANGED", SET_POLYGON_COLOR = "SET_POLYGON_COLOR", SET_BACKGROUND_COLOR = "SET_BACKGROUND_COLOR", CLEAR_POLYGON_COLOR = "CLEAR_POLYGON_COLOR", CLEAR_ALL_POLYGON_COLORS = "CLEAR_ALL_POLYGON_COLORS", ADD_INTERACTIVE_POLYGON = "ADD_INTERACTIVE_POLYGON", REMOVE_INTERACTIVE_POLYGONS = "REMOVE_INTERACTIVE_POLYGONS", ENABLE_IMAGE_FLIPPING_FOR_POLYGON = "ENABLE_IMAGE_FLIPPING_FOR_POLYGON", GET_DIRECTIONS = "GET_DIRECTIONS", GET_DISTANCE_TO = "GET_DISTANCE_TO", DESTROY = "DESTROY", DATA_LOADED = "DATA_LOADED", FIRST_MAP_LOADED = "FIRST_MAP_LOADED", SET_STATE = "SET_STATE", STATE_CHANGED = "STATE_CHANGED", GET_NEAREST_NODE_BY_SCREEN_COORDINATES = "GET_NEAREST_NODE_BY_SCREEN_COORDINATES", GET_MAPPEDIN_COORDINATE_AT_SCREEN_COORDINATE = "GET_MAPPEDIN_COORDINATE_AT_SCREEN_COORDINATE", CLICK = "CLICK", GET_PRIMARY_LOCATION_FOR_POLYGON = "GET_PRIMARY_LOCATION_FOR_POLYGON", GET_POLYGONS_AT_COORDINATE = "GET_POLYGONS_AT_COORDINATE", GET_POLYGONS_AT_SCREEN_COORDINATE = "GET_POLYGONS_AT_SCREEN_COORDINATE", CREATE_TOOLTIP = "CREATE_TOOLTIP", CREATE_CUSTOM_TOOLTIP = "CREATE_CUSTOM_TOOLTIP", REMOVE_TOOLTIP = "REMOVE_TOOLTIP", CHANGE_LANGUAGE = "CHANGE_LANGUAGE", GET_CURRENT_LANGUAGE = "GET_CURRENT_LANGUAGE", SET_ANTI_ALIAS_CONFIGURATION = "SET_ANTI_ALIAS_CONFIGURATION", SET_AMBIENT_OCCLUSION_CONFIGURATION = "SET_AMBIENT_OCCLUSION_CONFIGURATION", /** * Camera */ ROTATION_CHANGED = "ROTATION_CHANGED", TILT_CHANGED = "TILT_CHANGED", ZOOM_CHANGED = "ZOOM_CHANGED", CAMERA_SET = "CAMERA_SET", CAMERA_ANIMATE = "CAMERA_ANIMATE", CAMERA_TRANSLATE = "CAMERA_TRANSLATE", POSITION_CHANGED = "POSITION_CHANGED", CAMERA_CHANGED = "CAMERA_CHANGED", SET_MIN_ZOOM = "SET_MIN_ZOOM", SET_MAX_ZOOM = "SET_MAX_ZOOM", SET_MAX_TILT = "SET_MAX_TILT", FOCUS_ON = "FOCUS_ON", CAMERA_SET_SAFE_AREA_INSETS = "CAMERA_SET_SAFE_AREA_INSETS", CAMERA_ENABLE_INTERACTIONS = "CAMERA_ENABLE_INTERACTIONS", CAMERA_DISABLE_INTERACTIONS = "CAMERA_DISABLE_INTERACTIONS", CAMERA_SET_INTERACTIONS = "CAMERA_SET_INTERACTIONS", /** * Flat Labels */ FLAT_LABEL_ALL_LOCATIONS = "FLAT_LABEL_ALL_LOCATIONS", REMOVE_ALL_FLAT_LABELS = "REMOVE_ALL_FLAT_LABELS", SET_FLAT_LABEL_HOVER_COLOR_FOR_ALL = "SET_FLAT_LABEL_HOVER_COLOR_FOR_ALL", ADD_FLAT_LABEL = "ADD_FLAT_LABEL", REMOVE_FLOATING_LABEL = "REMOVE_FLOATING_LABEL", SET_FLOATING_LABEL_PRIORITY = "SET_FLOATING_LABEL_PRIORITY", RESET_FLOATING_LABEL_PRIORITY = "RESET_FLOATING_LABEL_PRIORITY", SET_FLOATING_LABEL_APPEARANCE = "SET_FLOATING_LABEL_APPEARANCE", /** * Floating Labels */ FLOATING_LABEL_ALL_LOCATIONS = "FLOATING_LABEL_ALL_LOCATIONS", REMOVE_ALL_FLOATING_LABELS = "REMOVE_ALL_FLOATING_LABELS", ADD_FLOATING_LABEL = "ADD_FLOATING_LABEL", REMOVE_FLAT_LABEL = "REMOVE_FLAT_LABEL", SET_FLAT_LABEL_APPEARANCE = "SET_FLAT_LABEL_APPEARANCE", /** * Blue Dot */ ENABLE_BLUE_DOT = "ENABLE_BLUE_DOT", DISABLE_BLUE_DOT = "DISABLE_BLUE_DOT", BLUEDOT_STATE_CHANGE = "BLUEDOT_STATE_CHANGE", BLUEDOT_POSITION_UPDATE = "BLUEDOT_POSITION_UPDATE", OVERRIDE_LOCATION = "OVERRIDE_LOCATION", /** * Journey */ SET_JOURNEY_STEP = "SET_JOURNEY_STEP", DRAW_JOURNEY = "DRAW_JOURNEY", CLEAR_JOURNEY = "CLEAR_JOURNEY", SET_JOURNEY_STEP_BY_PATH = "SET_JOURNEY_STEP_BY_PATH", /** * Markers */ CREATE_MARKER = "CREATE_MARKER", REMOVE_MARKER = "REMOVE_MARKER", REMOVE_ALL_MARKERS = "REMOVE_ALL_MARKERS", SET_MARKER_POSITION = "SET_MARKER_POSITION", ANIMATE_MARKER = "ANIMATE_MARKER", /** * Paths */ ADD_PATH = "ADD_PATH", REMOVE_PATH = "REMOVE_PATH", REMOVE_ALL_PATHS = "REMOVE_ALL_PATHS", /** * Offline Search */ SEARCH = "SEARCH", SUGGEST = "SUGGEST", ADD_SEARCH_QUERY = "ADD_SEARCH_QUERY", /** * @deprecated Use {@link FLAT_LABEL_ALL_LOCATIONS} or {@link FLOATING_LABEL_ALL_LOCATIONS} instead. */ LABEL_ALL_LOCATIONS = "LABEL_ALL_LOCATIONS", /** * @deprecated * Use EVENT.CLICK instead */ NOTHING_CLICKED = "NOTHING_CLICKED", /** * @deprecated * Use EVENT.CLICK instead */ POLYGON_CLICKED = "POLYGON_CLICKED", /** * @deprecated * Use EVENT.ADD_PATH instead */ DRAW_PATH = "DRAW_PATH" } export enum WAYFINDING_EVENT { GET_MAPS_IN_NAVIGATION = "GET_MAPS_IN_NAVIGATION", SHOW_JOURNEY = "SHOW_JOURNEY", START_NAVIGATION = "START_NAVIGATION", STOP_NAVIGATION = "STOP_NAVIGATION", SEEK = "SEEK", GET_MODE = "GET_MODE", EXIT_NAVIGATION = "EXIT_NAVIGATION" } export enum BRIDGE_EVENT { RESOLVE = "RESOLVE", REJECT = "REJECT" } export enum MINIMAP_EVENT { LOAD_MINIMAP = "LOAD_MINIMAP", SHOW_MINIMAP = "SHOW_MINIMAP", READY = "MINIMAP_READY", CACHE_IMAGE = "CACHE_IMAGE" } export enum NATIVE_EVENT { LOG = "LOG", READY = "READY", GET_MAP_POLYGONS = "GET_MAP_POLYGONS", GET_IMAGE = "GET_IMAGE" } } declare module '@mappedin/react-native-sdk/wrappers/common/payloads' { import { IDirectionsResult, MappedinMap, MappedinNode, TBlueDotPositionUpdate, TBlueDotStateChange, TGetVenueOptions, TCameraTransform, TAddFlatLabelOptions, TAddFloatingLabelOptions, TPathOptions, TShowVenueOptions, STATE, TGeolocationObject, TEnableBlueDotOptions, MappedinLocation, TFlatLabelAllLocationsOptions, TFloatingLabelAllLocationsOptions, TMappedinOfflineSearchOptions, TFocusOnCameraOptions, TCameraAnimationOptions, TCameraInteractionsSetOptions, TGetPolygonsAtCoordinateOptions, E_CAMERA_DIRECTION, TFlatLabelAppearance, TFloatingLabelAppearance } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; import { TFocusOnTargetsSerializable, TMiMapViewOptions, TSerializedCoordinate, TSerializedMap, TSerializableJourneyOptions, TSerializedLocation, TSerializedNode, TSerializedPolygon, TFloatingLabelClickEventPayloadSerialized, TColliderClickEventPayloadSerialized } from '@mappedin/react-native-sdk/wrappers/common/types'; import { BRIDGE_EVENT, EVENT, MINIMAP_EVENT, NATIVE_EVENT } from '@mappedin/react-native-sdk/wrappers/common'; import { TAnimationOptions, TAntialiasConfiguration, TCreateTooltipCommonOptions, TCreateTooltipOptions, TGetVenueMakerOptions, TAOConfiguration } from '@mappedin/react-native-sdk/sdks/cms/src'; export type TBridgeGetVenueOptions = (TGetVenueOptions | TGetVenueMakerOptions) & { useBundle?: boolean; }; export type BRIDGE_EVENT_PAYLOADS = { [BRIDGE_EVENT.REJECT]: any; [BRIDGE_EVENT.RESOLVE]: any; [NATIVE_EVENT.READY]: null; [NATIVE_EVENT.LOG]: string; [NATIVE_EVENT.GET_IMAGE]: { fileName: string; }; [NATIVE_EVENT.GET_MAP_POLYGONS]: { mapId: string; }; [MINIMAP_EVENT.READY]: null; [MINIMAP_EVENT.SHOW_MINIMAP]: { format: 'jsonstring'; venueData: string; options: TMiMapViewOptions; }; [MINIMAP_EVENT.LOAD_MINIMAP]: { options: TGetVenueOptions | TGetVenueMakerOptions; }; [MINIMAP_EVENT.CACHE_IMAGE]: { url?: string; options: TGetVenueOptions | TGetVenueMakerOptions; locationId: MappedinLocation['id']; polygonHighlightColor?: string; focusOptions?: TFocusOnCameraOptions & TCameraAnimationOptions; }; [EVENT.SET_DEBUG_FLAGS]: any; [EVENT.CLEAR_BUNDLE_CACHE]: null; [EVENT.NOTHING_CLICKED]: null; [EVENT.STATE_CHANGED]: { state: STATE; }; [EVENT.DATA_LOADED]: { venueData: any; }; [EVENT.FIRST_MAP_LOADED]: { venueData?: any; }; [EVENT.MAP_CHANGED]: { mapId: string; }; [EVENT.POLYGON_CLICKED]: { polygonId: string; }; [EVENT.ROTATION_CHANGED]: { rotation: number; }; [EVENT.TILT_CHANGED]: { tilt: number; }; [EVENT.POSITION_CHANGED]: { position: { x: number; y: number; }; }; [EVENT.CAMERA_CHANGED]: { rotation: number; tilt: number; zoom: number; position: TSerializedCoordinate; }; [EVENT.ZOOM_CHANGED]: { zoom: number; }; [EVENT.UPDATE_GEOLOCATION]: { msgID: undefined; data: unknown; }; [EVENT.BLUEDOT_STATE_CHANGE]: { stateChange: TBlueDotStateChange; }; [EVENT.BLUEDOT_POSITION_UPDATE]: { update: Omit & { nearestNode?: MappedinNode['id']; map?: MappedinMap['id']; }; }; [EVENT.SET_JOURNEY_STEP]: { step: number; }; [EVENT.SET_JOURNEY_STEP_BY_PATH]: { path: { id: string; }; }; [EVENT.LOAD_VENUE]: { options: TBridgeGetVenueOptions; showVenueOptions: TShowVenueOptions & { /** * Generate a search index for venue when rendering map, instead of deferring to when the first search occurs. * @default false */ prepareSearch?: boolean; /** * Customize search weights */ searchOptions?: TMappedinOfflineSearchOptions; }; context: string; }; [EVENT.SHOW_VENUE]: { venueData: string; format: 'jsonstring'; showVenueOptions: TShowVenueOptions & { /** * Generate a search index for venue when rendering map, instead of deferring to when the first search occurs. * @default false */ prepareSearch?: boolean; /** * Customize search weights */ searchOptions?: TMappedinOfflineSearchOptions; }; }; [EVENT.SET_MAP]: { mapId: string; }; [EVENT.CAMERA_SET]: { positionOptions: Omit & { position?: TSerializedCoordinate | TSerializedNode; }; }; [EVENT.CAMERA_ANIMATE]: { config: Omit & { position?: TSerializedCoordinate | TSerializedNode; }; options?: TCameraAnimationOptions; }; [EVENT.CAMERA_TRANSLATE]: { direction: E_CAMERA_DIRECTION; distance: number; options?: TCameraAnimationOptions; }; [EVENT.CAMERA_SET_SAFE_AREA_INSETS]: { safeAreaInsets: { top: number; bottom: number; left: number; right: number; }; }; [EVENT.CAMERA_ENABLE_INTERACTIONS]: null; [EVENT.CAMERA_DISABLE_INTERACTIONS]: null; [EVENT.CAMERA_SET_INTERACTIONS]: { options: TCameraInteractionsSetOptions; }; [EVENT.CLEAR_POLYGON_COLOR]: { polygonId: string; }; [EVENT.FOCUS_ON]: { targets: TFocusOnTargetsSerializable; options?: TFocusOnCameraOptions & TCameraAnimationOptions; }; [EVENT.SET_POLYGON_COLOR]: { polygon: TSerializedPolygon; color: string; }; [EVENT.SET_BACKGROUND_COLOR]: { backgroundColor: string; }; [EVENT.CLEAR_ALL_POLYGON_COLORS]: null; [EVENT.ADD_INTERACTIVE_POLYGON]: { polygonId: string; }; [EVENT.REMOVE_INTERACTIVE_POLYGONS]: null; [EVENT.ENABLE_IMAGE_FLIPPING_FOR_POLYGON]: { polygon: TSerializedPolygon; }; [EVENT.LABEL_ALL_LOCATIONS]: { options?: (Omit | Omit) & { locations?: string[]; flatLabels?: boolean; interactive?: boolean; }; }; [EVENT.FLAT_LABEL_ALL_LOCATIONS]: { options?: Omit & { locations?: string[]; }; }; [EVENT.FLOATING_LABEL_ALL_LOCATIONS]: { options?: Omit & { locations?: string[]; }; }; [EVENT.REMOVE_ALL_FLAT_LABELS]: null; [EVENT.REMOVE_ALL_FLOATING_LABELS]: null; [EVENT.ADD_FLAT_LABEL]: { polygon: TSerializedPolygon; text: string; options?: TAddFlatLabelOptions; }; [EVENT.SET_FLAT_LABEL_HOVER_COLOR_FOR_ALL]: { color: string; }; [EVENT.ADD_FLOATING_LABEL]: { polygonOrNodeOrCoordinate: TSerializedPolygon | TSerializedNode | TSerializedCoordinate; text: string; options?: TAddFloatingLabelOptions; }; [EVENT.REMOVE_FLAT_LABEL]: { polygon: TSerializedPolygon; }; [EVENT.REMOVE_FLOATING_LABEL]: { polygonOrNode: TSerializedPolygon | TSerializedNode; }; [EVENT.SET_FLOATING_LABEL_PRIORITY]: { polygonOrNode: TSerializedPolygon | TSerializedNode; priority: number; }; [EVENT.RESET_FLOATING_LABEL_PRIORITY]: { polygonOrNode: TSerializedPolygon | TSerializedNode; }; [EVENT.SET_FLAT_LABEL_APPEARANCE]: { polygon: TSerializedPolygon; appearance: TFlatLabelAppearance; }; [EVENT.SET_FLOATING_LABEL_APPEARANCE]: { polygonOrNode: TSerializedPolygon | TSerializedNode; appearance: TFloatingLabelAppearance; }; [EVENT.ENABLE_BLUE_DOT]: { options?: TEnableBlueDotOptions; }; [EVENT.DISABLE_BLUE_DOT]: null; [EVENT.GET_DIRECTIONS]: { to: TSerializedNode | TSerializedLocation | TSerializedPolygon; from: TSerializedNode | TSerializedLocation | TSerializedPolygon; accessible?: boolean; }; [EVENT.GET_DISTANCE_TO]: { to: TSerializedNode | TSerializedLocation | TSerializedPolygon; from: TSerializedNode | TSerializedLocation | TSerializedPolygon; accessible?: boolean; }; [EVENT.DESTROY]: null; [EVENT.SET_MIN_ZOOM]: { zoomLevel: number; }; [EVENT.SET_MAX_ZOOM]: { zoomLevel: number; }; [EVENT.SET_MAX_TILT]: { tiltAngle: number; }; [EVENT.CREATE_MARKER]: { nodeOrCoordinate: TSerializedNode | TSerializedCoordinate; contentHtml: string; options: any; }; [EVENT.REMOVE_MARKER]: { markerId: string; }; [EVENT.REMOVE_ALL_MARKERS]: null; [EVENT.SET_MARKER_POSITION]: { markerId: string; nodeOrCoordinate: TSerializedNode | TSerializedCoordinate; }; [EVENT.ANIMATE_MARKER]: { markerId: string; nodeOrCoordinate: TSerializedNode | TSerializedCoordinate; animationOptions: TAnimationOptions; }; [EVENT.OVERRIDE_LOCATION]: { location: TGeolocationObject; }; [EVENT.DRAW_PATH]: { path: MappedinNode['id'][]; pathOptions: TPathOptions; }; [EVENT.ADD_PATH]: { nodesOrCoordinates: TSerializedNode[] | TSerializedCoordinate[]; options: TPathOptions; }; [EVENT.REMOVE_PATH]: { path: { id: string; }; }; [EVENT.REMOVE_ALL_PATHS]: null; [EVENT.SET_STATE]: { state: STATE; }; [EVENT.CLEAR_JOURNEY]: null; [EVENT.DRAW_JOURNEY]: { directions: IDirectionsResult; options: TSerializableJourneyOptions; }; [EVENT.SET_COOKIE]: { cookie: any; }; [EVENT.GET_NEAREST_NODE_BY_SCREEN_COORDINATES]: { x: number; y: number; map?: MappedinMap['id']; }; [EVENT.GET_MAPPEDIN_COORDINATE_AT_SCREEN_COORDINATE]: { x: number; y: number; mapId: MappedinMap['id']; }; [EVENT.SEARCH]: { query: string; }; [EVENT.SUGGEST]: { query: string; }; [EVENT.ADD_SEARCH_QUERY]: { query: string; object: { type: 'MappedinLocation' | 'MappedinCategory' | 'Custom'; id: string; }; weight?: number; }; [EVENT.CLICK]: { position: { latitude: number; longitude: number; }; polygons: TSerializedPolygon[]; floatingLabels: TFloatingLabelClickEventPayloadSerialized[]; tooltips: TColliderClickEventPayloadSerialized[]; markers: TColliderClickEventPayloadSerialized[]; maps: TSerializedMap[]; nearBlueDot: boolean; paths: { id: string; }[]; }; [EVENT.GET_PRIMARY_LOCATION_FOR_POLYGON]: { polygon: TSerializedPolygon; }; [EVENT.GET_POLYGONS_AT_COORDINATE]: { coordinate: TSerializedCoordinate; options?: TGetPolygonsAtCoordinateOptions; }; [EVENT.GET_POLYGONS_AT_SCREEN_COORDINATE]: { x: number; y: number; options?: TGetPolygonsAtCoordinateOptions; }; [EVENT.CREATE_TOOLTIP]: { nodeOrCoordinate: TSerializedNode | TSerializedCoordinate; contentHtml: string; options?: TCreateTooltipOptions; }; [EVENT.CREATE_CUSTOM_TOOLTIP]: { nodeOrCoordinate: TSerializedNode | TSerializedCoordinate; contentHtml: string; selector: string; options?: TCreateTooltipCommonOptions; }; [EVENT.REMOVE_TOOLTIP]: { tooltipId: string; }; [EVENT.CHANGE_LANGUAGE]: { language: string; cache: boolean; }; [EVENT.GET_CURRENT_LANGUAGE]: null; [EVENT.SET_ANTI_ALIAS_CONFIGURATION]: { aaConfig: TAntialiasConfiguration; }; [EVENT.SET_AMBIENT_OCCLUSION_CONFIGURATION]: { aoConfig: TAOConfiguration; }; }; } declare module '@mappedin/react-native-sdk/wrappers/common/types' { import { TFocusOptionsLegacy } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/Core.interface'; import type { MappedinNode, MappedinPolygon, TJourneyOptions, TShowVenueOptions, ThingsOption, TLabelAllLocationFlatLabelOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; export type TFocusOnTargetsSerializable = { nodes?: MappedinNode['id'][]; polygons?: MappedinPolygon['id'][]; coordinates?: TSerializedCoordinate[]; }; export type TFocusOnOptionsLegacySerializable = Omit & { nodes?: MappedinNode['id'][]; polygons?: MappedinPolygon['id'][]; }; export type TSerializedNode = { id: string; type: 'Node'; }; export type TSerializedLocation = { id: string; type: 'Location'; }; export type TSerializedPolygon = { id: string; type: 'Polygon'; }; export type TSerializedMap = { id: string; type: 'Map'; }; export type TColliderClickEventPayloadSerialized = { id: string; node?: TSerializedNode; coordinate?: TSerializedCoordinate; }; export type TFloatingLabelClickEventPayloadSerialized = { text?: string; } & Omit; export type TSerializedCoordinate = { type: 'Coordinate'; mapId: string; lat: number; lon: number; }; export type TSerializableJourneyOptions = TJourneyOptions & Omit & { connectionTemplateString?: string; destinationMarkerTemplateString?: string; departureMarkerTemplateString?: string; color?: string; }; export type TMiMapViewVenueOptions = { /** * Client ID */ clientId?: string; /** * Client Secret */ clientSecret?: string; /** * Venue Slug */ venue: string; /** * Venue Perspective */ perspective?: string; baseUrl?: string; noAuth?: boolean; language?: string; emitAnalyticsEvents?: boolean; /** * An object specifying additional properties to fetch for each data item. * Each key represents a data item (e.g., 'locations', 'nodes'), and the value is an array of strings indicating extra properties to be included. * @example * For example: * ``` * getVenue({ * venue: 'some-venue', * things: { vortexes: [ 'material' ] * }}) * ``` */ things?: ThingsOption; }; /** * @experimental * Options for fetching a venue from Maker. */ export type TMiMapViewVenueMakerOptions = { /** * Maker auth key. */ key: string; /** * Maker auth secret. */ secret: string; /** * Maker map ID. */ mapId: string; /** * Optionally provide a custom base URL for the Maker map API request. */ bundleBaseUri?: string; /** * Optionally provide a custom base URL for the Maker auth token request. */ authBaseUri?: string; /** * Whether or not to emit analytics events. * @default true */ emitAnalyticsEvents?: boolean; }; export type TMiMapViewOptions = TShowVenueOptions & (TMiMapViewVenueOptions | TMiMapViewVenueMakerOptions); /** * @deprecated Only used for the deprecated {@link LABEL_ALL_LOCATIONS} event */ export type TReactNativeFlatLabelAllLocationsLegacy = Omit; /** * @deprecated Only used for the deprecated {@link LABEL_ALL_LOCATIONS} event */ export type TReactNativeFlatLabelAllLocations = TLabelAllLocationFlatLabelOptions & { flatLabels: true; }; } declare module '@mappedin/react-native-sdk/wrappers/common/options' { import type { TGetVenueOptionsInternal, TAllGetVenueOptions, TGetVenueOptions } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.types'; /** * Covert Bridge Options to get-venue options */ export function processBridgeOptions(bridgeOptions: TGetVenueOptions & { useBundle?: boolean; }): TGetVenueOptionsInternal; } declare module '@mappedin/react-native-sdk/wrappers/common/pub-sub' { export class PubSub { _subscribers: any; publish(eventName: EVENT_NAME, data?: EVENT_PAYLOAD[EVENT_NAME]): void; on(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME]) => void): void; off(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME]) => void): void; destroy(): void; } } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/Core.interface' { import { Color, Vector2, Vector3, Mesh } from 'three'; import type { TPadding, TGetPolygonsAtCoordinateOptions, TMapViewOptions, TileManager, BillboardManager, StackedMapsController, SmartCollisionEngine, OutdoorViewController, LayerController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { BlueDotController, CameraController, STATE, MappedinMap, Mappedin, MappedinCoordinate, MappedinPolygon, MappedinNode, changeListenerFn, RENDER, INTERNAL_EVENT_PAYLOAD, INTERNAL_EVENT, TaskScheduler, SceneManager, PubSub, FlatLabel, MapObject, PathsController, FloatingLabelsController, FlatLabelsController, PolygonColorsController, MarkersController, PolygonInteractionController, TooltipsController, PolygonStatesController, PolygonImagesController, ThreeDMarkersController, ExportController, EventSystem } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import Tween, { Easing } from '@tweenjs/tween.js'; import WatermarkController from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/WatermarkController'; import PolygonHoverColorsController from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/PolygonHoverColorsController'; import { E_MAP_CHANGED_REASON } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.enums'; export type TFocusOptionsLegacy = { /** * An array of Nodes to focus in on */ nodes?: (MappedinNode | MappedinNode['id'])[]; /** * An array of Polygons to focus on. It's the center of the bounds of all Polygons, designed to fit everything into view. */ polygons?: (MappedinPolygon | MappedinPolygon['id'])[]; /** * The duration (in ms) the focus animation should last for. * @defaultValue `100` */ duration?: number; /** * Whether to zoom the camera in or out, or just pan it. * @defaultValue `true` */ changeZoom?: boolean; /** * The animation curve to use for zooming in. Uses the animateCamera one by default. */ curve?: typeof Easing; /** * Camera tilt between 0 (top-down) to 1 (from the side) */ tilt?: number; /** * Rotation in degrees */ rotation?: number; /** * You can overide the {{#crossLink "MapView/focusZoomFactor:property"}}{{/crossLink}} for a specific {{#crossLink "MapView/focusOn:method"}}{{/crossLink}} call, rather than globally, if you like. */ focusZoomFactor?: number; /** * Sets a floor for how close you can zoom in on the scene. If it's lower than mapView.controls.minZoom, it's ignored. * @defaultValue: 0 */ minZoom?: number; maxZoom?: number; /** * Whether {@link Camera.minZoom} and {@link Camera.maxZoom} should be recalculated during the focusing animation. */ updateZoomLimits?: boolean; padding?: TPadding; points?: any[]; boundingBox?: any; doNotEmitFocusOnEvent?: boolean; callback: () => void; cancelledCallback?: () => void; }; /** * Ben Liu, 2023/03/29 * * This causes the generation of the index.d.ts file to break entirely for some reason. * * TODO: Figure out why */ export interface ICore extends PubSub { /** * Controllers */ eventSystem: EventSystem; floatingLabels: FloatingLabelsController; flatLabels: FlatLabelsController; paths: PathsController; polygonColors: PolygonColorsController; polygonHoverColors: PolygonHoverColorsController; polygonInteraction: PolygonInteractionController; polygonStates: PolygonStatesController; polygonImages: PolygonImagesController; markers: MarkersController; tooltips: TooltipsController; threeDMarkers: ThreeDMarkersController; blueDot: BlueDotController; camera: CameraController; tileManager: TileManager; billboardManager: BillboardManager; stackedMaps: StackedMapsController; outdoorViewController?: OutdoorViewController; exportController: ExportController; watermark: WatermarkController; layerController: LayerController; state: STATE; options: TMapViewOptions & { onDataLoaded?: (data: Mappedin) => void; onFirstMapLoaded?: (data: Mappedin) => void; }; currentPath?: MappedinNode[]; referenceMap: MappedinMap; taskScheduler: TaskScheduler; sceneManager: SceneManager | undefined; loadOptions?: TMapViewOptions['loadOptions']; imageFlippingEnabled: boolean; imageFlippingCache: Record; cachedPadding: TPadding; getCameraFrameForPoints: any; polygonMeshesById: Record; textLabelsByPolygonId: Record; renderer: any; scene: any; cameraParameters: Vector2; cameraParametersZoomVector: Vector2; resolution: Vector2; determineNewLabelSize: any; visibleMapsInCurrentScene: MappedinMap[]; visibleLayersInCurrentScene: { [mapId: string]: MappedinPolygon['layer'][]; }; visibleMapObjectsInCurrentScene: MapObject[]; mapSetInProgress: Promise; mapSetResolved: (...args: any[]) => any; on(eventName: EVENT_NAME, fn: (payload: INTERNAL_EVENT_PAYLOAD[EVENT_NAME] extends { data: null; } ? INTERNAL_EVENT_PAYLOAD[EVENT_NAME]['data'] : INTERNAL_EVENT_PAYLOAD[EVENT_NAME]) => void): void; off(eventName: EVENT_NAME, fn: changeListenerFn): void; publish(eventName: EVENT_NAME, payload?: INTERNAL_EVENT_PAYLOAD[EVENT_NAME]): void; /** * Manual camera controls for MapView. Generally you should be using the functions on MapView like {{#crossLink "MapView/focusOn:method"}}{{/crossLink}}, * but if you have some cool animations in mind, you can do it with the {{#crossLink "CameraControls"}}{{/crossLink}}. * Some of the functions don't do anything in 2D. * */ controls: any; /** * The Venue data this MapView is using. * * @property venue {MappedinVenue} * @final */ readonly venue: Mappedin; /** * The div MapView is using. * * @property container {Div} * @final */ readonly container: HTMLElement; /** * The ID of the Map currently being displayed. * */ readonly currentMap: string | null; /** * Change this factor to influence how much the camera zooms in on a {@link IMapView3D.focusOn} call. * * @property focusZoomFactor {Integer} * @default 3 */ focusZoomFactor: number; /** * Returns the value you should call {@link CameraControls.setZoom} on to fit the Polygon exactly. * * @return The zoom level that will fit the Polygon */ getZoomLevelForPolygon(props: { /** * The Polygon or Polygon ID to get the zoom level for */ polygonOrPolygonId: MappedinPolygon | string; }): number; /** * Returns the value you should call {@link CameraControls.setZoom} on to fit the {@link IMapView3D.currentMap} exactly. * * @return The zoom level that will fit the {@link IMapView3D.currentMap}. */ getZoomLevelForCurrentMap(): number; /** * Returns the angle that points to north, in radians, from the default orientation. * * @return The angle to north from the default orientation, in radians. */ getNorth(): number; /** * Takes an element on the DOM and rotates it such that the top is pointing north. It will rotate with the camera, staying locked * on north. If you would like to align it do a different direction, or a different side of the element, pass in an offset. This * is how you would do a compass rose. * * This will modify your element's transform. * * @param element The element on the page to rotate. * @param offset The amount to offset the rotation by, in radians. * */ lockNorth(element: HTMLElement, offset?: number): void; /** * Stops the MapView from trying to rotate your element with the camera. Do this if you remove the element, or want to stop it from rotating. * @param element The node to stop rotating. It won't reset the transform, just leave it as is. */ unlockNorth(element: HTMLElement): void; /** * Returns all polygons that contain the specified MappedinCoordinate. * * @param coordinate The MappedinCoordinate to check * @param hoverableMeshChildren * @param options {@link TGetPolygonsAtCoordinateOptions} */ getPolygonsAtScreenCoordinate(x: number, y: number, options?: TGetPolygonsAtCoordinateOptions): MappedinPolygon[]; /** * Returns all polygons at the specified screen coordinate. * * @param coordinate The Vector2 coordinate to check * @param hoverableMeshChildren * @param options {@link TGetPolygonsAtCoordinateOptions} */ getPolygonsAtCoordinate(coordinate: MappedinCoordinate, options?: TGetPolygonsAtCoordinateOptions): MappedinPolygon[]; currentInteractionEvent: INTERNAL_EVENT | undefined; interactivePolygons: Record; /** * An object containing polygon ids and their hover colors. */ polygonHoverColorsById: Record; /** * An Object to keep track of highlighted polygon id and the highlight color as the value initiated by setPolygonColor */ highlightedPolygons: Record; /** * An object containing all outlined polygons. */ outlinedPolygons: Map; /** * A plane that is parallel to the ground and is used for raycasting. */ worldPlane: Mesh; getPositionLatLon(lat: number, lon: number, map?: MappedinMap | string | null): Vector3; currentScale: number; getPositionPolygon(polygon: MappedinPolygon | string): Vector3; /** * Takes an x/y pair in Mappedin coordinate space and gives you a Vector3 in scene space * @param nodeOrCoordinate a node or coordinate */ convertTo3DMapPosition(nodeOrCoordinate: MappedinCoordinate | MappedinNode): Vector3; /** * Converts a Vector-like object into a MappedinCoordinate for a map. * @param position an object with x and y, like a Vector3 * @param mapClass An optional map; otherwise, the current map will be used. */ convert3DMapPositionToCoordinate(position: { x: number; y: number; }, mapClass?: MappedinMap): MappedinCoordinate; /** * Converts a 2D x,y screen position into a 3D MappedinCoordinate using projection */ convertScreenCoordinateToMapCoordinate(x: number, y: number, map: MappedinMap): MappedinCoordinate; setPadding(padding: { top: number; left: number; bottom: number; right: number; }): void; smartCollisionEngine: SmartCollisionEngine; mapObjects: Map; /** * The scene only renders when something has changed. This should be something a 3rd party developer doesn't need to worry about, * but if you are doing something weird, or have your own special tween for something, you will want to call this function. * You can call it as often as you want, it just sets a flag that we need to render again, and renders a few frames if we weren't already doing that. * Ignored in 2D. */ tryRendering(renderMode?: RENDER): void; setMapReason?: E_MAP_CHANGED_REASON; setMap(mapOrMapId: MappedinMap | string): Promise; setMapWithReason(mapOrMapId: MappedinMap | string, context: E_MAP_CHANGED_REASON): Promise; getPositionNode(node: MappedinNode): Vector3; cameraObject: any; setBackgroundColor(color: string, alpha?: number): void; mapManager: any; focusOn(focusOptions: TFocusOptionsLegacy): Tween; canvasWidth: number; canvasHeight: number; setState(state: STATE): Promise; getNearestNodeByScreenCoordinate(x: number, y: number, mapOrMapId?: MappedinMap | MappedinMap['id']): MappedinNode; destroy(): void; } } declare module '@mappedin/react-native-sdk/wrappers/common/controller' { import { PubSub, BRIDGE_EVENT, BRIDGE_EVENT_PAYLOADS } from '@mappedin/react-native-sdk/wrappers/common'; export function uuid(): string; export class MappedinController { #private; /** * private event bus for proxying messages to listeners in child classes * @hidden */ privateEventBus: PubSub<{ REJECT: { msgID?: string; data: any; }; RESOLVE: { msgID?: string; data: any; }; READY: { msgID?: string; data: null; }; LOG: { msgID?: string; data: string; }; GET_IMAGE: { msgID?: string; data: { fileName: string; }; }; GET_MAP_POLYGONS: { msgID?: string; data: { mapId: string; }; }; MINIMAP_READY: { msgID?: string; data: null; }; SHOW_MINIMAP: { msgID?: string; data: { format: "jsonstring"; venueData: string; options: import("./types").TMiMapViewOptions; }; }; LOAD_MINIMAP: { msgID?: string; data: { options: import("../react-native-sdk/src").TGetVenueOptions | import("../react-native-sdk/src").TGetVenueMakerOptions; }; }; CACHE_IMAGE: { msgID?: string; data: { url?: string; options: import("../react-native-sdk/src").TGetVenueOptions | import("../react-native-sdk/src").TGetVenueMakerOptions; locationId: string; polygonHighlightColor?: string; focusOptions?: import("../react-native-sdk/src").TFocusOnCameraOptions & import("../../sdks/cms/src").TAnimationOptions; }; }; SET_DEBUG_FLAGS: { msgID?: string; data: any; }; CLEAR_BUNDLE_CACHE: { msgID?: string; data: null; }; NOTHING_CLICKED: { msgID?: string; data: null; }; STATE_CHANGED: { msgID?: string; data: { state: import("../react-native-sdk/src").STATE; }; }; DATA_LOADED: { msgID?: string; data: { venueData: any; }; }; FIRST_MAP_LOADED: { msgID?: string; data: { venueData?: any; }; }; MAP_CHANGED: { msgID?: string; data: { mapId: string; }; }; POLYGON_CLICKED: { msgID?: string; data: { polygonId: string; }; }; ROTATION_CHANGED: { msgID?: string; data: { rotation: number; }; }; TILT_CHANGED: { msgID?: string; data: { tilt: number; }; }; POSITION_CHANGED: { msgID?: string; data: { position: { x: number; y: number; }; }; }; CAMERA_CHANGED: { msgID?: string; data: { rotation: number; tilt: number; zoom: number; position: import("./types").TSerializedCoordinate; }; }; ZOOM_CHANGED: { msgID?: string; data: { zoom: number; }; }; UPDATE_GEOLOCATION: { msgID?: string; data: { msgID: undefined; data: unknown; }; }; BLUEDOT_STATE_CHANGE: { msgID?: string; data: { stateChange: import("../react-native-sdk/src").TBlueDotStateChange; }; }; BLUEDOT_POSITION_UPDATE: { msgID?: string; data: { update: Omit & { nearestNode?: string; map?: string; }; }; }; SET_JOURNEY_STEP: { msgID?: string; data: { step: number; }; }; SET_JOURNEY_STEP_BY_PATH: { msgID?: string; data: { path: { id: string; }; }; }; LOAD_VENUE: { msgID?: string; data: { options: import("./payloads").TBridgeGetVenueOptions; showVenueOptions: import("../react-native-sdk/src").TShowVenueOptions & { prepareSearch?: boolean; searchOptions?: Partial; }; context: string; }; }; SHOW_VENUE: { msgID?: string; data: { venueData: string; format: "jsonstring"; showVenueOptions: import("../react-native-sdk/src").TShowVenueOptions & { prepareSearch?: boolean; searchOptions?: Partial; }; }; }; SET_MAP: { msgID?: string; data: { mapId: string; }; }; CAMERA_SET: { msgID?: string; data: { positionOptions: Omit & { position?: import("./types").TSerializedCoordinate | import("./types").TSerializedNode; }; }; }; CAMERA_ANIMATE: { msgID?: string; data: { config: Omit & { position?: import("./types").TSerializedCoordinate | import("./types").TSerializedNode; }; options?: import("../../sdks/cms/src").TAnimationOptions; }; }; CAMERA_TRANSLATE: { msgID?: string; data: { direction: import("../react-native-sdk/src").E_CAMERA_DIRECTION; distance: number; options?: import("../../sdks/cms/src").TAnimationOptions; }; }; CAMERA_SET_SAFE_AREA_INSETS: { msgID?: string; data: { safeAreaInsets: { top: number; bottom: number; left: number; right: number; }; }; }; CAMERA_ENABLE_INTERACTIONS: { msgID?: string; data: null; }; CAMERA_DISABLE_INTERACTIONS: { msgID?: string; data: null; }; CAMERA_SET_INTERACTIONS: { msgID?: string; data: { options: import("../../sdks/cms/src").TCameraInteractionsSetOptions; }; }; CLEAR_POLYGON_COLOR: { msgID?: string; data: { polygonId: string; }; }; FOCUS_ON: { msgID?: string; data: { targets: import("./types").TFocusOnTargetsSerializable; options?: import("../react-native-sdk/src").TFocusOnCameraOptions & import("../../sdks/cms/src").TAnimationOptions; }; }; SET_POLYGON_COLOR: { msgID?: string; data: { polygon: import("./types").TSerializedPolygon; color: string; }; }; SET_BACKGROUND_COLOR: { msgID?: string; data: { backgroundColor: string; }; }; CLEAR_ALL_POLYGON_COLORS: { msgID?: string; data: null; }; ADD_INTERACTIVE_POLYGON: { msgID?: string; data: { polygonId: string; }; }; REMOVE_INTERACTIVE_POLYGONS: { msgID?: string; data: null; }; ENABLE_IMAGE_FLIPPING_FOR_POLYGON: { msgID?: string; data: { polygon: import("./types").TSerializedPolygon; }; }; LABEL_ALL_LOCATIONS: { msgID?: string; data: { options?: (Omit | Omit) & { locations?: string[]; flatLabels?: boolean; interactive?: boolean; }; }; }; FLAT_LABEL_ALL_LOCATIONS: { msgID?: string; data: { options?: Omit & { locations?: string[]; }; }; }; FLOATING_LABEL_ALL_LOCATIONS: { msgID?: string; data: { options?: Omit & { locations?: string[]; }; }; }; REMOVE_ALL_FLAT_LABELS: { msgID?: string; data: null; }; REMOVE_ALL_FLOATING_LABELS: { msgID?: string; data: null; }; ADD_FLAT_LABEL: { msgID?: string; data: { polygon: import("./types").TSerializedPolygon; text: string; options?: import("../react-native-sdk/src").TAddFlatLabelOptions; }; }; SET_FLAT_LABEL_HOVER_COLOR_FOR_ALL: { msgID?: string; data: { color: string; }; }; ADD_FLOATING_LABEL: { msgID?: string; data: { polygonOrNodeOrCoordinate: import("./types").TSerializedCoordinate | import("./types").TSerializedNode | import("./types").TSerializedPolygon; text: string; options?: import("../react-native-sdk/src").TAddFloatingLabelOptions; }; }; REMOVE_FLAT_LABEL: { msgID?: string; data: { polygon: import("./types").TSerializedPolygon; }; }; REMOVE_FLOATING_LABEL: { msgID?: string; data: { polygonOrNode: import("./types").TSerializedNode | import("./types").TSerializedPolygon; }; }; SET_FLOATING_LABEL_PRIORITY: { msgID?: string; data: { polygonOrNode: import("./types").TSerializedNode | import("./types").TSerializedPolygon; priority: number; }; }; RESET_FLOATING_LABEL_PRIORITY: { msgID?: string; data: { polygonOrNode: import("./types").TSerializedNode | import("./types").TSerializedPolygon; }; }; SET_FLAT_LABEL_APPEARANCE: { msgID?: string; data: { polygon: import("./types").TSerializedPolygon; appearance: import("../react-native-sdk/src").TFlatLabelAppearance; }; }; SET_FLOATING_LABEL_APPEARANCE: { msgID?: string; data: { polygonOrNode: import("./types").TSerializedNode | import("./types").TSerializedPolygon; appearance: import("../react-native-sdk/src").TFloatingLabelAppearance; }; }; ENABLE_BLUE_DOT: { msgID?: string; data: { options?: import("../react-native-sdk/src").TEnableBlueDotOptionsBase; }; }; DISABLE_BLUE_DOT: { msgID?: string; data: null; }; GET_DIRECTIONS: { msgID?: string; data: { to: import("./types").TSerializedNode | import("./types").TSerializedLocation | import("./types").TSerializedPolygon; from: import("./types").TSerializedNode | import("./types").TSerializedLocation | import("./types").TSerializedPolygon; accessible?: boolean; }; }; GET_DISTANCE_TO: { msgID?: string; data: { to: import("./types").TSerializedNode | import("./types").TSerializedLocation | import("./types").TSerializedPolygon; from: import("./types").TSerializedNode | import("./types").TSerializedLocation | import("./types").TSerializedPolygon; accessible?: boolean; }; }; DESTROY: { msgID?: string; data: null; }; SET_MIN_ZOOM: { msgID?: string; data: { zoomLevel: number; }; }; SET_MAX_ZOOM: { msgID?: string; data: { zoomLevel: number; }; }; SET_MAX_TILT: { msgID?: string; data: { tiltAngle: number; }; }; CREATE_MARKER: { msgID?: string; data: { nodeOrCoordinate: import("./types").TSerializedCoordinate | import("./types").TSerializedNode; contentHtml: string; options: any; }; }; REMOVE_MARKER: { msgID?: string; data: { markerId: string; }; }; REMOVE_ALL_MARKERS: { msgID?: string; data: null; }; SET_MARKER_POSITION: { msgID?: string; data: { markerId: string; nodeOrCoordinate: import("./types").TSerializedCoordinate | import("./types").TSerializedNode; }; }; ANIMATE_MARKER: { msgID?: string; data: { markerId: string; nodeOrCoordinate: import("./types").TSerializedCoordinate | import("./types").TSerializedNode; animationOptions: import("../../sdks/cms/src").TAnimationOptions; }; }; OVERRIDE_LOCATION: { msgID?: string; data: { location: import("../react-native-sdk/src").TGeolocationObject; }; }; DRAW_PATH: { msgID?: string; data: { path: string[]; pathOptions: import("../react-native-sdk/src").TPathOptions; }; }; ADD_PATH: { msgID?: string; data: { nodesOrCoordinates: import("./types").TSerializedCoordinate[] | import("./types").TSerializedNode[]; options: import("../react-native-sdk/src").TPathOptions; }; }; REMOVE_PATH: { msgID?: string; data: { path: { id: string; }; }; }; REMOVE_ALL_PATHS: { msgID?: string; data: null; }; SET_STATE: { msgID?: string; data: { state: import("../react-native-sdk/src").STATE; }; }; CLEAR_JOURNEY: { msgID?: string; data: null; }; DRAW_JOURNEY: { msgID?: string; data: { directions: import("../react-native-sdk/src").IDirectionsResult; options: import("./types").TSerializableJourneyOptions; }; }; SET_COOKIE: { msgID?: string; data: { cookie: any; }; }; GET_NEAREST_NODE_BY_SCREEN_COORDINATES: { msgID?: string; data: { x: number; y: number; map?: string; }; }; GET_MAPPEDIN_COORDINATE_AT_SCREEN_COORDINATE: { msgID?: string; data: { x: number; y: number; mapId: string; }; }; SEARCH: { msgID?: string; data: { query: string; }; }; SUGGEST: { msgID?: string; data: { query: string; }; }; ADD_SEARCH_QUERY: { msgID?: string; data: { query: string; object: { type: "MappedinLocation" | "MappedinCategory" | "Custom"; id: string; }; weight?: number; }; }; CLICK: { msgID?: string; data: { position: { latitude: number; longitude: number; }; polygons: import("./types").TSerializedPolygon[]; floatingLabels: import("./types").TFloatingLabelClickEventPayloadSerialized[]; tooltips: import("./types").TColliderClickEventPayloadSerialized[]; markers: import("./types").TColliderClickEventPayloadSerialized[]; maps: import("./types").TSerializedMap[]; nearBlueDot: boolean; paths: { id: string; }[]; }; }; GET_PRIMARY_LOCATION_FOR_POLYGON: { msgID?: string; data: { polygon: import("./types").TSerializedPolygon; }; }; GET_POLYGONS_AT_COORDINATE: { msgID?: string; data: { coordinate: import("./types").TSerializedCoordinate; options?: import("../../sdks/cms/src").TGetPolygonsAtCoordinateOptions; }; }; GET_POLYGONS_AT_SCREEN_COORDINATE: { msgID?: string; data: { x: number; y: number; options?: import("../../sdks/cms/src").TGetPolygonsAtCoordinateOptions; }; }; CREATE_TOOLTIP: { msgID?: string; data: { nodeOrCoordinate: import("./types").TSerializedCoordinate | import("./types").TSerializedNode; contentHtml: string; options?: import("../../sdks/cms/src").TCreateTooltipOptions; }; }; CREATE_CUSTOM_TOOLTIP: { msgID?: string; data: { nodeOrCoordinate: import("./types").TSerializedCoordinate | import("./types").TSerializedNode; contentHtml: string; selector: string; options?: import("../../sdks/cms/src").TCreateTooltipCommonOptions; }; }; REMOVE_TOOLTIP: { msgID?: string; data: { tooltipId: string; }; }; CHANGE_LANGUAGE: { msgID?: string; data: { language: string; cache: boolean; }; }; GET_CURRENT_LANGUAGE: { msgID?: string; data: null; }; SET_ANTI_ALIAS_CONFIGURATION: { msgID?: string; data: { aaConfig: import("../../sdks/cms/src").TAntialiasConfiguration; }; }; SET_AMBIENT_OCCLUSION_CONFIGURATION: { msgID?: string; data: { aoConfig: import("../../sdks/cms/src").TAOConfiguration; }; }; }>; /** * Message received from the other side of the bridge * @hidden */ onMessageReceived(eventName: EVENT_NAME, payload: { data: BRIDGE_EVENT_PAYLOADS[EVENT_NAME]; msgID?: string; }): void; /** * Send a message to the other side of the bridge * * @hidden */ sendMessage(eventName: EVENT_NAME, payload?: { msgID?: string; data: BRIDGE_EVENT_PAYLOADS[EVENT_NAME] | null; }): void; /** * Handle resolution from the other side, with a value if one was expected * @hidden */ protected handleResolution: (payload: { msgID: string; data: { payload: BRIDGE_EVENT_PAYLOADS[EVENT_NAME]; }; }) => void; /** * Handle rejection from the other side, typically when the request results in an error * @hidden */ protected handleRejection: (payload: { msgID: string; data: { payload: BRIDGE_EVENT_PAYLOADS[EVENT_NAME]; }; }) => void; /** * Emitting a message without expecting a response * @hidden */ emit(eventName: EVENT_NAME, payload?: BRIDGE_EVENT_PAYLOADS[EVENT_NAME], msgID?: string): void; /** * Emitting a message and waiting for a reponse, via a promise * @hidden */ emitAsync(eventName: EVENT_NAME, payload?: BRIDGE_EVENT_PAYLOADS[EVENT_NAME], msgID?: string): Promise; } } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.FloatingLabel' { import './Mappedin.FloatingLabel.scss'; import { BaseCollider } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import type { TDrawFn } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/shave-text'; import type { MappedinPolygon } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import type { ICore, ICollider, TColliderStrategy, TColliderPosition } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; type TStyle = { top?: number; left?: number; textLabelVisible?: boolean; pinVisibility: PINVISIBILITY; textAlign?: TEXTALIGN; cachedSymbol?: HTMLCanvasElement; }; export interface ISmarterLabel extends ICollider { zoomProportion: number; contextConfigured: boolean; fillText?: TDrawFn; _cache: { [key: string]: HTMLCanvasElement | OffscreenCanvas; }; lines: number; style: TStyle; newStyle: TStyle; getCachedSymbol: (orientation: string, textAlign: TEXTALIGN, xCoordinate: number) => HTMLCanvasElement | OffscreenCanvas; draw: (context: CanvasRenderingContext2D) => void; } /** * Control how a floating label looks */ export type TFloatingLabelAppearance = { /** * Margin around the label and marker. This will affect label density. Minimum is 6px. * @default 6 */ margin?: number; text?: { /** * Number of lines to display when text spans multiple lines */ numLines?: number; /** * Text size in pixels */ size?: number; /** * Maxiumum width of text in pixels */ maxWidth?: number; /** * Line height sets the height of a line box. It's commonly used to set the distance between lines of text * * @default 1.2 */ lineHeight?: number; /** * Text foreground color */ foregroundColor?: string; /** * Text background color */ backgroundColor?: string; }; marker?: { /** * Whether the icon should scale with the zoom level */ iconScaleInterpolation?: boolean; /** * Size of the marker in pixels * @deprecated Behavior when using this along with `iconVisibilityThreshold` and `icon` is undefined */ size?: number; foregroundColor?: { /** * Foreground color of the marker when it is active */ active?: string; /** * Foreground color of the marker when it is inactive (grayed out due to being outranked by other labels around) */ inactive?: string; }; backgroundColor?: { /** * Background color of the marker when it is active */ active?: string; /** * Background color of the marker when it is inactive (grayed out due to being outranked by other labels around) */ inactive?: string; }; /** * Size of bounding box of the icon * @default 10 */ iconSize?: number; /** * Icon to be placed inside the Floating Label marker. Supports SVG or a URL to png or jpeg. * @example * ```ts * // SVG * mapView.FloatingLabels.add(polygon, "Label", { * appearance: { * marker: { * icon: `...`, * }, * }, * }); * ``` * * @example * ```ts * // Image URL * mapView.FloatingLabels.add(polygon, "Label", { * appearance: { * marker: { * icon: 'https://example.com/icon.png', * }, * }, * }); * ``` */ icon?: string; /** * How the icon should fit inside the marker. By default, this is not set and the icon will be centered inside the marker. * - `fill` will stretch the icon to fill the marker. * - `cover` will maintain aspect ratio and fill the marker. * - `contain` will maintain aspect ratio and fit the icon inside the marker. */ iconFit?: 'contain' | 'fill' | 'cover'; /** * Padding around the icon, in pixels. * @default 4 */ iconPadding?: number; /** * Defines when the icon becomes visible relative to the current zoom level * anything below 0 will result in icons never showing up * 0 ensures icons show up at maxZoom (fully zoomed in) * 1 ensures they always show up */ iconVisibilityThreshold?: number; }; }; type TAppearanceFilledIn = { margin: number; text: { numLines: number; lineHeight: number; size: number; maxWidth: number; foregroundColor: string; backgroundColor: string; }; marker: { size: number; foregroundColor: { active: string; inactive: string; }; backgroundColor: { active: string; inactive: string; }; iconScaleInterpolation: boolean; iconSize?: number; icon?: string; iconFit?: 'fill' | 'cover' | 'contain'; iconPadding: number; iconVisibilityThreshold?: number; }; }; export type TFloatingLabelOptionsInternal = { id?: string; position: TColliderPosition; polygon?: MappedinPolygon; mapId: string; polygonHeight?: number; text?: string; shortText?: string; stateText?: string; rank?: number; scale?: number; /** * Customize the appearance of the Smart Label and its marker */ appearance?: TFloatingLabelAppearance; createDespiteImage?: boolean; layer?: string; interactive?: boolean; }; enum PINVISIBILITY { OPAQUE = 1, SEMI_TRANSPARENT = 0.5 } enum TEXTALIGN { LEFT = "left", CENTER = "center", RIGHT = "right" } class InternalFloatingLabel extends BaseCollider implements ISmarterLabel { #private; lines: number; contextConfigured: boolean; fillText: TDrawFn; newStyle: { pinVisibility: PINVISIBILITY; }; static testId: number; style: TStyle; setColor: () => void; scale: number; clearColor: () => void; zoomProportion: number; _cache: {}; appearance: TAppearanceFilledIn; mapView: ICore; position: TColliderPosition; options: TFloatingLabelOptionsInternal; constructor(options: TFloatingLabelOptionsInternal, mapView: ICore); enable(updateEngine?: boolean): void; get totalTextBoxHeight(): number; get totalTextBoxWidth(): number; get totalMarkerSize(): any; get strategies(): TColliderStrategy[]; getCachedSymbol(orientation: any, textAlign: any, xCoordinate: any): any; invalidate(): void; colliderDidMount(): void; colliderDidUpdatePosition(pos: any): void; colliderDidUpdateVisiblity(): void; colliderDidGoOutsideGrid(): void; colliderDidNotFindAHome(): void; disable(updateEngine?: boolean): void; static imagePromiseCache: { [key in number]?: Promise; }; static imageDimensionsCache: { [key in number]: { width: number; height: number; }; }; get pinCanvasSize(): number; iconVisible: boolean; draw(context: CanvasRenderingContext2D): void; } export default InternalFloatingLabel; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core' { import { IStateMachine } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.StateMachine'; import { E_BLUEDOT_MARKER_STATE, E_BLUEDOT_STATE, E_BLUEDOT_STATE_REASON } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.enums'; import PositionSmoothing from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.BlueDot/position-smoothing'; import { IPubSub } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/pub-sub'; import { MappedinMap, MappedinNode } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import { IPositionUpdater, TGeolocationObject } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types'; import type { ICore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { BlueDotManager } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; export const DEFAULT_BLUE_DOT_COLOR = "#2266ff"; export type TEnableBlueDotOptions = { /** * Show Bearing * @defaultValue false */ showBearing?: boolean; /** * For venues that do not provide level updates, assume the user is always on the default map * If this is false, and no level information is found from position updates, blueDotUpdate events will * not include the nearest node * This should probably be set true for single floor venues that have no level information in position updates * * @defaultValue false */ allowImplicitFloorLevel?: boolean; /** * Smooth incoming position updates. Set to false if smoothing happens outside the SDK * @defaultValue true */ smoothing?: boolean; /** * Custom positionUpdater * @defaultValue undefined */ positionUpdater?: IPositionUpdater; /** * Override the default color of the Blue Dot. We interpolate other colors, (such as aura and bearing) from this base color * @defaultValue '#2266ff' */ baseColor?: string; /** * Whether to use the rotated view while following the user's position. * @defaultValue false */ useRotationMode?: boolean; }; export type TUserData = { state: E_BLUEDOT_STATE; position: TGeolocationObject | null; map: MappedinMap | null; bearing: any; nearestNode: any; hasEverReceivedFloorLevel: boolean; }; export interface IBlueDotCore extends IPubSub { positionUpdater: IPositionUpdater | null; positionSmoothing: PositionSmoothing; locationUncertainTimeoutPeriod: number; fallbackToGPSTimeoutPeriod: number; enableBlueDot: (options?: TEnableBlueDotOptions) => void; disableBlueDot: () => void; enableBlueDotOptions: TEnableBlueDotOptions; enabled: boolean; enableTargetMapOverride: (mapId: MappedinMap['id'], options?: { restoreWhenNewFloorLevelIsReceived: boolean; }) => void; disableTargetMapOverride: () => void; targetMapOverride?: { mapId: MappedinMap['id']; lastStoredMapId?: MappedinMap['id']; options?: { restoreWhenNewFloorLevelIsReceived: boolean; }; }; state: TBlueDotStateChange; /** Whether blue dot should be allowed with missing floor level information. */ forceBlueDot: boolean; /** Whether we have received floorLevel data and are on a floorLevel supported device */ hasEverReceivedFloorLevel: boolean; /** The state machine for the current state of the blue dot. */ stateMachine: IStateMachine; /** The map the user's device is currently on. */ userMap: MappedinMap | null; /** The position of the user's device. */ userPosition: TGeolocationObject | null; /** The nearest node to the user's position. */ nearestNode: any; /** The direction the user is moving. */ bearing: any; /** * When bearing is set by updateBearing. undefined if overrideBearing is turned off */ overrideBearing?: number; /** Everything in one object, for convenience. */ userData: TUserData | null; } export type TBlueDotPositionUpdate = { /** * The {@link MappedinMap} Blue Dot position is on */ map?: MappedinMap; /** * The nearest {@link MappedinNode} to the Blue Dot position */ nearestNode?: MappedinNode; /** * Actual position of Blue Dot (post smoothing, if smoothing is enabled) */ position?: TGeolocationObject; /** * Current Blue Dot bearing */ bearing?: number; }; export type TBlueDotStateChange = { /** * What we currently know about the user's position, and how confident we are. */ name: E_BLUEDOT_STATE; /** * Visiblity state of the Blue Dot marker */ markerVisibility?: E_BLUEDOT_MARKER_STATE; /** * Reason why Blue Dot may be in the current state */ reason?: E_BLUEDOT_STATE_REASON; /** * Additional message to complement the reason */ message?: GeolocationPositionError | string; }; export const FALLBACK_TO_GPS_TIMEOUT = 10000; type TBlueDotProps = { data: any; core: ICore; manager: BlueDotManager; }; export type TLatLonProps = [number, number]; const BlueDot: { ({ data, core, manager }: TBlueDotProps): IBlueDotCore; FakeGeolocation: any; }; export default BlueDot; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/PathsController' { import { Group } from 'three'; import { MappedinNode, MappedinCoordinate } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import type { ICore, TPathOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { ANIMATION_TWEENS } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; /** * @hidden * @internal */ export type TPathOptionsInternal = TPathOptions & { curve?: typeof ANIMATION_TWEENS; drawConnectionSegments?: boolean; dashed?: boolean; connectionPathOptions?: TPathOptions & { curve?: typeof ANIMATION_TWEENS; }; alwaysVisible?: boolean; zOffset?: number; }; /** * @hidden * @internal */ export type TInternalPathSegment = { id: string; nodes: (MappedinNode | MappedinCoordinate)[]; mapId?: string; isConnectionPathSegment?: boolean; reset: () => void; resetPulse: () => void; object: any; tween: any; pulseTween: any; endPauseTween?: any; arrowAnimationTween: any; }; /** * An object containing information that was used to draw a path on the map. */ export class Path { #private; constructor(internalPathObject: InternalPath); /** * A generated ID for this path object */ get id(): string; /** * A {@link MappedinNode}[] representing the nodes in the path */ get nodes(): MappedinNode[]; /** * A {@link MappedinCoordinate}[] representing the coordinates in the path */ get coordinates(): MappedinCoordinate[]; } /** * @hidden * @internal * * Represents all the segments created for a single call to drawPath() */ export class InternalPath { id: string; nodes: MappedinNode[]; coordinates: MappedinCoordinate[]; pathSegments: TInternalPathSegment[]; options: TPathOptionsInternal; constructor(path: (MappedinNode | MappedinCoordinate)[], pathSegments: TInternalPathSegment[], options: TPathOptionsInternal); } /** * @hidden * @internal */ class PathsController { #private; constructor(core: ICore); pathSegments: Map; pathsById: Map; pathsByMeshId: Map; connectionsPathMeshes: Group; getPathLength(path: any): number; /** * Draws path in 3D space * * Draws an entire path. It takes a list of nodes and will break them into separate path segments on every man change, putting the resultant segment on the right map. * * If you have a special use case (like off graph nodes, or venues with same map vortexes) use the drawPathSegment function. * * @method drawPath * @param path {[MappedinNode]} An array of Nodes, probably from a Node's {{#crossLink "MappedinNode/directionsTo:method"}}{{/crossLink}} call. * @param [options] {Object} Options for path drawing * @param [options.color='#ff834c'] {String} Path Colour * @param [options.pulseColor='#ffffff'] {String} Colour of path pulse * @param [options.pulseIterations=1] {Number} Number of iterations to pulse to indicate direction, also accepts 'Infinity' * @param [options.pulsePauseDuration=750] {Number} How many milliseconds to wait before starting the next pulse after the current pulse travels the entirety of the path * @param [options.nearRadius=1.8] {Number} Radius of path at nearest zoom * @param [options.farRadius=options.nearRadius] {Number} Radius of path at furthest zoom * @param [options.nearZoom=375] {Number} Zoom level where the path size is `nearRadius` * @param [options.farZoom=10000] {Number} Zoom level where the path size is `farRadius` * @param [options.drawDuration=1200] {Number} Duration of path drawing * @param [options.curve=TWEEN.Easing.Cubic.InOut] {Object} Path animation curve * * // NOTE: These options are disabled * @param [options.drawConnectionSegments=true] Draw map-to-map connection segments * @param [options.connectionPathOptions] {Object} Options for floor-to-floor connection paths * @param [options.connectionPathOptions.color='#ff834c'] {String} Path Colour * @param [options.connectionPathOptions.pulseColor='#ffffff'] {String} Colour of path pulse * @param [options.connectionPathOptions.pulseIterations=Infinity] {Number} Number of iterations to pulse to indicate direction * @param [options.connectionPathOptions.nearRadius=1.8] {Number} Radius of path at nearest zoom * @param [options.connectionPathOptions.farRadius=options.connectionPathOptions.nearRadius] {Number} Radius of path at furthest zoom * @param [options.connectionPathOptions.nearZoom=375] {Number} Zoom level where the path size is `nearRadius` * @param [options.connectionPathOptions.farZoom=10000] {Number} Zoom level where the path size is `farRadius` * @param [options.connectionPathOptions.drawDuration=600] {Number} Duration of path drawing * @param [options.connectionPathOptions.curve=TWEEN.Easing.Cubic.InOut] {Object} Connection Path animation curve * * @returns {Array} Array of Tween segments representing paths drawn on screen */ drawPath(path: (MappedinNode | MappedinCoordinate)[], options?: TPathOptionsInternal): Path; /** * Redraw an existing path with optional new options. This avoids changing its ID or reference. */ redrawPath(path: Path, options?: TPathOptionsInternal): void; removePath(pathOrPathId: Path | string): void; hideConnectionSegments(): void; showConnectionSegments(): void; removeAllPaths(): void; } export default PathsController; export function getRadius number) | undefined>(v: T): T extends number | (() => number) ? number : undefined; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.SmartTooltip' { import './Mappedin.SmartTooltip.scss'; import { HTMLCollider, COLLISION_RANKING_TIERS } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import type { IHTMLCollider, TColliderPosition, TColliderStrategy } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; /** * * A Tooltip is an html element that attempts to orient itself around an anchor in 3D space. It will always maintain the same size on the screen, but will attempt to change its orientation based on other colliders in the scene. * * Make your own and add it directly to the map with {{#crossLink "MapView/createTooltip:method"}}{{/crossLink}}, or use the constructor and add it when you want. * * You will need to specify at least `options.position` and one of `options.html` and `options.selector` OR `options.contentHtml`. * * * @class Tooltip * * @constructor * @param options {Object} Passes on options (e.g. html, text, position, map, padding, defaultAnchorType, enabledAnchorTypes, collisionRank) to MapView.Tooltip's options argument. * @param [options.html] Pass in custom html for your marker, if using this method you must also pass in a selector for your content. * @param [options.selector] Used in conjuction with the html property to select the div for repositioning * @param [options.contentHtml] Use mappedin's default tooltip styling with custom inner html content * @param [options.text] Instead of passing html pass in plain text to be displayed in the tooltip * @param [options.position] should be something you got from {{#crossLink "MapView/getPositionPolygon:method"}}{{/crossLink}} or {{#crossLink "MapView/getPositionNode:method"}}{{/crossLink}}. * @param [options.map] The map ID where the tooltip should be displayed * @param [options.defaultAnchorType] The default orientation to place the tooltip. * @param [options.padding] The distance in pixel to offset the tooltip from the anchor point. * @param [options.enabledAnchorTypes] An object used to disable certain anchor positions from being used. * @param [options.collisionRank] The rank of the object used when comparing colliders to determine which should be shown. */ export type TSmartTooltipOptions = { html?: string; contentHtml?: string; text?: string; position: TColliderPosition; selector?: string; map: string; padding?: number; collisionRank?: COLLISION_RANKING_TIERS; defaultAnchorType?: string; enabledAnchorTypes?: { [type: string]: boolean; }; interactive?: boolean; layer?: string; dotColor?: string; dotSize?: number; }; type TTooltipStyle = { top?: string; left?: string; }; /** * An object that defines which anchors are enabled for a tooltip. An anchor is a direction, relative * to a position, where a tooltip may appear. For example, a tooltip with a `right` anchor will appear * to the right of its position. */ export type TOOLTIP_ANCHOR = { dot?: boolean; top?: boolean; left?: boolean; topLeft?: boolean; right?: boolean; topRight?: boolean; bottom?: boolean; bottomLeft?: boolean; bottomRight?: boolean; }; class SmartTooltip extends HTMLCollider implements IHTMLCollider { #private; className: string; _el: Element | null; style: TTooltipStyle; position: TColliderPosition; /** * @private * cached container class number to avoid recommutation per update */ containerClassesLength: number; dotEl: HTMLDivElement; constructor(options: TSmartTooltipOptions); updateClassName: (className: any) => void; get strategies(): TColliderStrategy[]; colliderDidMount(): void; /** * @internal */ updateDimensionsImmediately(): void; setAction(action: any): void; colliderDidNotFindAHome(): void; colliderDidGoOffscreen(): void; colliderDidUpdateVisiblity(): void; /** * @private * @param interactive - whether the tooltip should be interactive or not */ updateInteractive(interactive: boolean): void; /** * Used in creation of container element. If we specify the tooltip to be interactive, we want to * make containerEl non-interactive so the click events register on the canvas eventually calls collider detection on the collision engine. * * @param tooltipInteractive * @returns */ static getContainerElClasses(tooltipInteractive: boolean): string; } export default SmartTooltip; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/OutdoorViewController' { import './OutdoorViewController.scss'; import type { ICore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import type { XOR } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types'; /** * Represents the possible positions for map attribution. */ export type TAttributionPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'; /** * Defines the options for an Outdoor View when initialized with headers for authentication. */ export type TOutdoorViewOptionsWithHeaders = { /** * The URL to the map style file. * @see https://github.com/maplibre/maplibre-style-spec/ */ url?: string; /** * The position on the map where the attribution should be displayed. * @default 'bottom-right' */ attributionPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'; /** * Custom text or an array of texts to be used for the map attribution. */ customAttribution?: string | string[]; /** * An object containing HTTP headers for authentication purposes. * */ headers: { [key: string]: string | null; }; /** * Outdoor map layers which should be hidden under the indoor geometry. * @default ['building-top'] */ layersHiddenByGeometry?: string[]; /** * If set to true, the map will be rendered in dpi=1 mode, which should make performance better */ lowDPI?: boolean; }; /** * Defines the options for an Outdoor View when initialized with a URL for authentication. */ export type TOutdoorViewOptionsWithAuthURL = { /** * The URL to the map style file. * @see https://github.com/maplibre/maplibre-style-spec/ */ url?: string; /** * The URL to obtain an authentication token. */ authURL?: string; /** * Custom text or an array of texts to be used for the map attribution. */ customAttribution?: string | string[]; /** * The position on the map where the attribution should be displayed. * @default 'bottom-right' */ attributionPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'; /** * Outdoor map layers which should be hidden under the indoor geometry. * @default ['building-top'] */ layersHiddenByGeometry?: string[]; /** * If set to true, the map will be rendered in dpi=1 mode, which should make performance better */ lowDPI?: boolean; }; /** * Defines the options for initializing an Outdoor View. * This is a union type that requires exclusive or logic, * ensuring that an instance can either have headers or * an authentication URL, but not both. * * Note: It isn't permitted to use `.headers` and `.authURL` options simultaneously. * * @property {string} [url] - The URL to the map style file. * @property {TAttributionPosition} [attributionPosition='bottom-right'] - The position on the map where the attribution should be displayed. * @property {string | string[]} [customAttribution] - Custom text or an array of texts to be used for the map attribution. * @property {Object.} [headers] - An object containing HTTP headers for authentication purposes. It isn't permitted to use `.headers` and `.authURL` options simultaneously. * @property {string} [authURL] - The URL to obtain an authentication token. It isn't permitted to use `.headers` and `.authURL` options simultaneously. * @interface */ export type TOutdoorViewOptions = XOR; class OutdoorViewController { _attribution: any; core: ICore; map: any; enabled: boolean; hidden: boolean; url: string; authURL: string; headers?: TOutdoorViewOptions['headers']; customAttribution?: string | string[]; attributionPosition?: TAttributionPosition; userHiddenLayers: string[]; loaded: boolean; options?: TOutdoorViewOptions; constructor(core: ICore, options?: TOutdoorViewOptions); module: any; load(): Promise; get attributions(): any; hide(): void; show(): void; resize(): void; getRequestHeaders: () => Promise; render(): void; setStyle(style: any): void; setAttributionPosition(position: TAttributionPosition): void; } export default OutdoorViewController; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/pub-sub' { type TChangeEventData = { oldValue: any; newValue: any; }; type TListenerFn = (data: TChangeEventData | any) => void; export interface IPubSub { publish: (eventName: any, data: TChangeEventData) => void; on: (eventName: any, listenerFn: TListenerFn) => void; off: (eventName: any, listenerFn: TListenerFn) => void; destroy: () => void; _subscribers: { [eventName in any]?: TListenerFn[]; }; } export class PubSub { _subscribers: any; publish(eventName: any, data: any): void; on(eventName: any, fn: any): void; off(eventName: any, fn: any): void; destroy(): void; } export function tinyObservable(store: T): T & IPubSub; export {}; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/BlueDotController' { import type { IBlueDotCore, ICore, TEnableBlueDotOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { E_BLUEDOT_EVENT_PAYLOAD, E_BLUEDOT_EVENT, MappedinMap, PubSub } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; /** * @hidden * @internal * * Blue Dot Layer used for controlling the Blue Dot and listening to Blue Dot state change and position update events. Use the {@link on}-method to set listeners for {@link TBlueDotStateChange} and {@link TBlueDotPositionUpdate} events. */ class BlueDotController extends PubSub { #private; core: ICore; blueDotCore: IBlueDotCore; /** * @private */ constructor(core: ICore); enableTargetMapOverride(mapId: MappedinMap['id'], options?: { restoreWhenNewFloorLevelIsReceived: boolean; }): void; disableTargetMapOverride(): void; enable(options?: TEnableBlueDotOptions): void; disable(): void; updateBearing(v?: number): void; } export default BlueDotController; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Journey' { import { TJourneyOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { MappedinDirections } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import { JourneyController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/JourneyController'; import { Path } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/PathsController'; import type Core from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/Core'; /** * API to control drawing a set of directions. See also {@link Paths}. */ class Journey { #private; /** * @private */ constructor(core: Core); /** * Draw a Journey based on directions. Example usage: * * ```ts * const startLocation = mapView.venue.locations.find(location => location.name === "Cleo"); * const endLocation = mapView.venue.locations.find(location => location.name === "American Eagle"); * * const directions = startLocation.directionsTo(endLocation); * mapView.Journey.draw(directions); * ``` * * Use options to set connection (such as elevators and escalators) HTML tooltip template, * departure and destination marker templates, path style and polygon higlight color. If * no options are set, sane defaults are used to draw markers, tooltips and polygon highlights. * * @param directions A single instance or an array of {@link MappedinDirections} used for the Journey. * @param options */ draw(directions: MappedinDirections | MappedinDirections[], options?: TJourneyOptions): JourneyController; /** * Set the step of a multipart Journey. Requires {@link draw} to have been called with an array * of {@link MappedinDirections}. An active step receives different styling. * * ```ts * // A multi destination set of directions * const departure = mapView.venue.locations.find((l) => l.name === "Apple")!; * const destination1 = mapView.venue.locations.find((l) => l.name === "Cleo")!; * const destination2 = mapView.venue.locations.find((l) => l.name === "KFC")!; * const destinationSet = new MappedinDestinationSet([destination1, destination2]); * const directions = departure.directionsTo(destinationSet); * * // By default step 0 is active, meaning Apple to Cleo * mapView.Journey.draw(directions); * * // Activate the step of the Journey from Cleo to KFC * mapView.Journey.setStep(1); * ``` * * @param step The step of the Journey to mark as active. */ setStep(step: number): void; /** * Set the step using a {@link Path} instance. Requires {@link draw} to have been called with an array * of {@link MappedinDirections}. An active step receives different styling. This is most commonly * used to activate a step when a path has been clicked. * * ```ts * // A multi destination set of directions * const departure = mapView.venue.locations.find((l) => l.name === "Apple")!; * const destination1 = mapView.venue.locations.find((l) => l.name === "Cleo")!; * const destination2 = mapView.venue.locations.find((l) => l.name === "KFC")!; * const destinationSet = new MappedinDestinationSet([destination1, destination2]); * const directions = departure.directionsTo(destinationSet); * * // Make sure that the paths are all interactive * mapView.Journey.draw(directions, { * pathOptions: { interactive: true }, * inactivePathOptions: { interactive: true }, * }); * * // Listen for a path being clicked * mapView.on(E_SDK_EVENT.CLICK, ({ path }) => { * if (path != null) { * mapView.Journey.setStepByPath(path); * } * }); * ``` * * @param path A {@link Path} instance that corresponds to a step in the Journey. */ setStepByPath(path: Path): void; /** * Clear the current Journey drawn by {@link draw}. * * ```ts * mapView.Journey.clear(); * ``` */ clear(): void; } export default Journey; } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.types' { import type { TGetVenueMVFOptions, TGetVenueMakerOptions } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import type { DefaultThings } from '@mappedin/react-native-sdk/sdks/packages/get-venue/default-things'; export type MergedThings = { [key in keyof DefaultThings]: string[]; } & { [k: string]: string[]; }; export type ThingsOption = Partial; export type TGetVenueOptions = { accessToken?: string; clientId?: string; clientSecret?: string; baseUrl?: string; includeHidden?: boolean; noAuth?: boolean; perspective?: string; language?: string; /** * Fallback to navigator language if the language is not available * @default true */ fallbackToNavigatorLanguages?: boolean; headers?: { [key in string]: string; }; venue: string; /** * An object specifying additional properties to fetch for each data item. * Each key represents a data item (e.g., 'locations', 'nodes'), and the value is an array of strings indicating extra properties to be included. * @example * For example: * ``` * getVenue({ * venue: 'some-venue', * things: { vortexes: [ 'material' ] * }}) * ``` */ things?: ThingsOption; useDraftData?: boolean; platformString?: string; emitAnalyticsEvents?: boolean; secure?: boolean; preloadMapGeometry?: boolean; }; export type TProcessedMVFOptions = TGetVenueMakerOptions & { emitAnalyticsEvents: boolean; clientId: string; clientSecret: string; venue: string; accessToken: string; }; export type TAllGetVenueOptions = TGetVenueOptions | TGetVenueMVFOptions | (TProcessedMVFOptions & { perspective?: string; }); export type TGetVenueOptionsInternal = Omit & { things?: MergedThings; }; export type TVenueMetadata = { languages: { name: string; code: string; }[]; hasSecureAssets: boolean; }; export enum MAP_RENDER_MODE { /** Each polygon, its geometry and mesh are sent to the GPU every render frame. * This was the default rendering mode before 4.0.17 */ MULTI_GEOMETRY = "MULTI_GEOMETRY", /** Polygons' geometries are grouped by material and merged together, resulting in far fewer * draw calls to the GPU. Default rendering mode since 4.0.17 */ SINGLE_GEOMETRY = "SINGLE_GEOMETRY" } } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin' { import { Navigator } from '@mappedin/react-native-sdk/sdks/packages/navigator'; import type { TAllGetVenueOptions, TGetVenueOptions, TGetVenueOptionsInternal } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.types'; import type { MappedinNode, MappedinPolygon, MappedinLocation, MappedinCategory, MappedinVortex, MappedinVenue, MappedinTheme, MappedinRankings, MappedinLocationRankings, MappedinEvent, MappedinLocationState, MappedinMap, MappedinMapGroup, GET_VENUE_PAYLOAD, TAccessors } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; import { GET_VENUE_EVENT } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; import type { IAnalytics } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.CustomerAnalytics'; import type { ParsedMVF } from '@mappedin/mvf'; import type { ParsedMVFv1 } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.MVF.types'; import { PubSub } from '@mappedin/react-native-sdk/sdks/packages/get-venue/pub-sub.typed'; export const defaultOptions: TGetVenueOptionsInternal; export class Mappedin extends PubSub { #private; perspective: any; things: any; options: TGetVenueOptionsInternal & Pick; updatedAt?: string; categories: MappedinCategory[]; locations: MappedinLocation[]; vortexes: MappedinVortex[]; maps: MappedinMap[]; nodes: MappedinNode[]; polygons: MappedinPolygon[]; venue: MappedinVenue; events: MappedinEvent[]; mapGroups: MappedinMapGroup[]; themes: MappedinTheme[]; locationStates: MappedinLocationState[]; rankings?: MappedinRankings; currentLanguage: { name: string; code: string; }; /** * @hidden * @internal * @deprecated Use {@link Mappedin.getCollectionItemById} instead */ _categoriesById?: { [id: string]: MappedinCategory; }; /** * @hidden * @internal * @deprecated Use {@link Mappedin.getCollectionItemById} instead */ _locationsById?: { [id: string]: MappedinLocation; }; /** * @hidden * @internal * @deprecated Use {@link Mappedin.getCollectionItemById} instead */ _vortexesById?: { [id: string]: MappedinVortex; }; /** * @hidden * @internal * @deprecated Use {@link Mappedin.getCollectionItemById} instead */ _mapsById?: { [id: string]: MappedinMap; }; /** * @hidden * @internal * @deprecated Use {@link Mappedin.getCollectionItemById} instead */ _nodesById?: { [id: string]: MappedinNode; }; /** * @hidden * @internal * @deprecated Use {@link Mappedin.getCollectionItemById} instead */ _polygonsById?: { [id: string]: MappedinPolygon; }; /** * @hidden * @internal * @deprecated Use {@link Mappedin.getCollectionItemById} instead */ _eventsById?: { [id: string]: MappedinEvent; }; /** * @hidden * @internal * @deprecated Use {@link Mappedin.getCollectionItemById} instead */ _mapGroupsById?: { [id: string]: MappedinMapGroup; }; /** * @hidden * @internal * @deprecated Use {@link Mappedin.getCollectionItemById} instead */ _locationStatesById?: { [id: string]: MappedinLocationState; }; /** * @hidden * @internal * @deprecated Use {@link Mappedin.getCollectionItemById} instead */ _locationRankingsById?: { [id: string]: MappedinLocationRankings; }; /** * @hidden * @internal * @deprecated Use {@link Mappedin.getCollectionItemById} instead */ _rankingsById?: { [id: string]: MappedinRankings; }; /** * @hidden * @internal * @deprecated Use {@link Mappedin.getCollectionItemById} instead */ _categoriesByExternalId?: { [id: string]: MappedinCategory; }; /** * @hidden * @internal * @deprecated Use {@link Mappedin.getCollectionItemById} instead */ _locationsByExternalId?: { [id: string]: MappedinLocation; }; /** * @hidden * @internal * @deprecated Use {@link Mappedin.getCollectionItemById} instead */ _vortexesByExternalId?: { [id: string]: MappedinVortex; }; /** * @hidden * @internal * @deprecated Use {@link Mappedin.getCollectionItemById} instead */ _mapsByExternalId?: { [id: string]: MappedinMap; }; /** * @hidden * @internal * @deprecated Use {@link Mappedin.getCollectionItemById} instead */ _nodesByExternalId?: { [id: string]: MappedinNode; }; /** * @hidden * @internal * @deprecated Use {@link Mappedin.getCollectionItemById} instead */ _polygonsByExternalId?: { [id: string]: MappedinPolygon; }; /** * @hidden * @internal * @deprecated Use {@link Mappedin.getCollectionItemById} instead */ _eventsByExternalId?: { [id: string]: MappedinEvent; }; /** * @hidden * @internal * @deprecated Use {@link Mappedin.getCollectionItemById} instead */ _mapGroupsByExternalId?: { [id: string]: MappedinMapGroup; }; /** * @hidden * @internal * @deprecated Use {@link Mappedin.getCollectionItemById} instead */ _locationStatesByExternalId?: { [id: string]: MappedinLocationState; }; /** * @hidden * @internal * @deprecated Use {@link Mappedin.getCollectionItemById} instead */ _locationRankingsByExternalId?: { [id: string]: MappedinLocationRankings; }; /** * @hidden * @internal * @deprecated Use {@link Mappedin.getCollectionItemById} instead */ _rankingsByExternalId?: { [id: string]: MappedinRankings; }; getCollectionItemById(name: T, id: I): TAccessors[T] | null; /** * @hidden * @internal */ hydrateFromMVF(mvfData: ParsedMVF): Promise; /** * @hidden * @internal */ hydrateFromMVFv1(mvfData: ParsedMVFv1): Promise; /** * Change the language of the venue. This will trigger a re-fetch of the venue data and emit a * {GET_VENUE_EVENT.LANGUAGE_CHANGED} event. * * @param languageCode The language code to change to * @param cache Whether or not to cache the current language so it doesn't need to be re-fetched */ changeLanguage: (languageCode: string, cache?: boolean) => Promise; /** * * @experimental Hydrate the Mappedin instance using a response from either {@link Mappedin.toString}, {@link getVenueBundle} or by downloading the bundle manually * @param mappedinSerializableData Mappedin data that was serialized or exported as JSON * @param shouldPopulateBundledImagesAsBlobs Takes the scenes and images from a bundle and maps them as blobs to where they exist as URLs in the bundle. False by default */ hydrate: (mappedinSerializableData: string | Record, shouldPopulateBundledImagesAsBlobs?: boolean, updateInPlace?: boolean) => Promise; images: any; imageBinaries?: Map; scenes: any; fetch(updateInPlace?: boolean): Promise; /** * @deprecated Use {@link hydrateVenue} instead */ constructor(options: TGetVenueOptionsInternal); analytics: IAnalytics; /** * @hidden */ navigator?: Navigator; /** * Export venue data to JSON (for storage, encryption, etc) */ toJSON: (includeOptions?: boolean) => any; /** * Export venue data to String */ toString: (includeOptions?: boolean) => string; } /** * Finds the ideal language for the venue based on the following priority: * 1. User specified language (if it exists in venue languages) * 2. Browser navigator languages (if fallback is enabled) * 3. Venue's default language * * @param venue - The MappedinVenue object containing available languages * @param options - Configuration options * @param options.language - Preferred language code to use * @param options.fallbackToNavigatorLanguages - Whether to use browser's language settings as fallback (defaults to true) * @returns An object containing the selected language code and name, or undefined if no language is found */ export function findPreferredLanguage(venue: MappedinVenue, options: { language?: string; fallbackToNavigatorLanguages?: boolean; }): { code: string; name: string; } | undefined; } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/default-things' { export const defaultThings: { venue: string[]; nodes: string[]; vortexes: string[]; polygons: string[]; locations: string[]; categories: string[]; maps: string[]; mapGroups: string[]; themes: string[]; rankings: string[]; }; export type DefaultThings = typeof defaultThings; } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/internal' { import { MappedinNavigatable } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinNavigatable'; import { MappedinNode } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinNode'; import { MappedinPolygon } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinPolygon'; import { MappedinLocation } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinLocation'; import { MappedinCategory } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinCategory'; import { MappedinDirections } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinDirections'; import { MappedinDestinationSet } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinDestinationSet'; import { MappedinVortex } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinVortex'; import { MappedinVenue } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinVenue'; import { MappedinTheme } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinTheme'; import { MappedinRankings } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinRankings'; import { MappedinLocationRankings } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinLocationRankings'; import { MappedinEvent } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinEvent'; import { MappedinLocationState } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinLocationState'; import { MappedinMap } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinMap'; import { MappedinCoordinate } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinCoordinate'; import { MappedinMapGroup } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinMapGroup'; export { MappedinNavigatable, MappedinNode, MappedinPolygon, MappedinLocation, MappedinCategory, MappedinDirections, MappedinDestinationSet, MappedinVortex, MappedinVenue, MappedinTheme, MappedinRankings, MappedinLocationRankings, MappedinEvent, MappedinLocationState, MappedinMap, MappedinCoordinate, MappedinMapGroup, }; export * from '@mappedin/react-native-sdk/sdks/packages/get-venue/utils'; export { default as MappedinCache } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.cache'; export enum MappedinCollectionType { CATEGORY = "categories", EVENT = "events", LOCATION = "locations", MAPGROUP = "mapGroups", MAP = "maps", NODE = "nodes", POLYGON = "polygons", VORTEX = "vortexes" } export type TAccessors = { [MappedinCollectionType.CATEGORY]: MappedinCategory; [MappedinCollectionType.EVENT]: MappedinEvent; [MappedinCollectionType.LOCATION]: MappedinLocation; [MappedinCollectionType.MAPGROUP]: MappedinMapGroup; [MappedinCollectionType.MAP]: MappedinMap; [MappedinCollectionType.NODE]: MappedinNode; [MappedinCollectionType.POLYGON]: MappedinPolygon; [MappedinCollectionType.VORTEX]: MappedinVortex; }; export const THINGS: { categories: typeof MappedinCategory; locations: typeof MappedinLocation; vortexes: typeof MappedinVortex; maps: typeof MappedinMap; nodes: typeof MappedinNode; polygons: typeof MappedinPolygon; venue: typeof MappedinVenue; events: typeof MappedinEvent; mapGroups: typeof MappedinMapGroup; themes: typeof MappedinTheme; locationStates: typeof MappedinLocationState; rankings: typeof MappedinRankings; }; export type TTHINGS = keyof typeof THINGS; export type { TDirectionToOptions } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinNavigatable'; export enum GET_VENUE_EVENT { LANGUAGE_CHANGED = 0 } export type GET_VENUE_PAYLOAD = { [GET_VENUE_EVENT.LANGUAGE_CHANGED]: { name: string; code: string; }; }; export { Mappedin, findPreferredLanguage } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin'; } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.CustomerAnalytics' { import type { MappedinNavigatable, MappedinLocation, MappedinCategory } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; type AnalyticsUserPosition = { bluedotTimestamp: number; latitude: number; longitude: number; floorLevel?: number; accuracy: number; }; type AnalyticsOptions = { clientId?: string; clientSecret?: string; accessToken?: string; noAuth?: boolean; venue: string; testMode?: boolean | string; context?: string; platformString?: string; }; interface IAnalytics { locationSelected(location: MappedinLocation): void; categorySelected(category: MappedinCategory): void; /** * @hidden * @internal * @deprecated */ getDirections(start: MappedinNavigatable, end: MappedinNavigatable): void; } interface IInternalAnalytics extends IAnalytics { track(target: string, query: any): void; mapViewLoaded(type: '2d' | '3d', forced: boolean, benchmark: number, reason: string): void; getSessionID(): string; getDeviceID(): string; setGeolocationMode(mode: boolean): void; trackBlueDotEvent(blueDotEvent: Record): void; trackSearch(searchAnalyticsObject: Record): void; trackSearchSuggest(searchAnalyticsObject: Record): void; } /** * @internal * @hidden * A singleton class to access the Mappedin Analytics platform. Correct usage will improve Smart Search results, and lead to more accurate insights. * This will be created for you as part of Mappedin.{{#crossLink "Mappedin/initialize:method"}}{{/crossLink}}, but you can also create one manually. You are mostly going to use `locationSelected`. * * @type {any} */ class Analytics implements IInternalAnalytics { #private; static instance: Analytics | null; /** * The static method to create a singleton instance of the Analytics class. * @class Analytics * @param options {Object} A list of configuration options for the Analytics API. * @param [options.clientId] {String} The same key you are using for getVenue. Handled automatically in Mapview.initialize() * @param [options.clientSecret] {String} The same secret you are using for getVenue. Handled automatically in Mapview.initialize() * @param [options.venue] {String} The same venue slug you are using for getVenue. Handled automatically in MapView.initialize() * @param [options.context] {String} The context to pass with the analytics request. Defaults to "websdk". * @param [options.noAuth] {Boolean} Whether authentication should not be sent with analytics requests. * @param [options.testMode] {Boolean} Whether analytics events should be dropped because this is running in a test environment. * @returns {Analytics} The singleton instance of the Analytics class. */ static create(options: AnalyticsOptions): Analytics; track(target: string, query: Record): void; /** * This method should be called whenever the user's position changes. This information will be sent when a track call is made. * @param position {AnalyticsUserPosition} The user's current position. */ updateAnalyticsUserPosition(position: Omit | undefined): void; /** * Whenever a location is selected, you should fire this event. What "selected" means can vary by venue, * but a good rule of thumb is that you fire the event whenever you would show the location's details. * Typically this is when the user taps it's polygon on the map, picks it from search results or a category list. * or deep links directly into the map. * @method locationSelected * @param location {MappedinLocation} The location the user selected. */ locationSelected(location: any): void; /** * Whenever a category is selected, you should fire this event. * @method categorySelected * @param category {MappedinCategory} The category the user selected. */ categorySelected(category: any): void; mapViewLoaded(type: any, forced: any, benchmark: any, reason: any): void; /** * Whenever a user requests directions, you should fire this event. * @method getDirections * @param start {MappedinLocation} The start location for wayfinding. * @param end {MappedinLocation} The end location for wayfinding. */ getDirections(start: any, end: any): void; /** * Returns the active mi-session ID. */ getSessionID(): string; /** * Sets the current global mi-session ID and overrides the local session ID. * @param sessionID {String} The session ID to be set. * @internal */ static setSessionID(sessionID: string): void; /** * Sets the current global device ID and overrides the local device ID. * @param deviceId {String} The device ID to be set. * @internal */ static setDeviceID(deviceId: string): void; /** * Clears the current global mi-session ID and reverts to the local session ID. * @internal */ static clearSessionID(): void; getDeviceID(): string; /** * @param mode {Boolean} Indicates whether the user's geolocation is enabled. */ setGeolocationMode(mode: any): void; /** * Track an event. * @method trackBlueDotEvent * @param event {String} * event param should be a property of the {{#crossLink "Analytics/BLUEDOT_EVENT:property"}}{{/crossLink}} property. */ trackBlueDotEvent(blueDotEvent: any): void; trackSearch(searchAnalyticsObject: any): void; trackSearchSuggest(searchAnalyticsObject: any): void; /** * Sets the current global context of the Analytics class. * @method setContext * @param context {String} The Analytics context to be set. * @hidden */ static setContext(context: any): void; /** * Sets the current global context of the Analytics class to undefined. * @method clearContext * @hidden */ static clearContext(): void; /** * Destroys the singleton instance of the Analytics class. * @method destroy * @hidden */ static destroy(): void; /** * Enum of valid bluedot events. * Pass a property of this into the {{#crossLink "Analytics/trackBlueDotEvent:method"}}{{/crossLink}} method. * Valid properties are: ATTEMPT_BLUEDOT, FOUND_POSITION, FOUND_FLOOR. * @property BLUEDOT_EVENT {Object} * @example * Analytics.trackBlueDotEvent(Analytics.BLUEDOT_EVENT.ATTEMPT_BLUEDOT) */ static BLUEDOT_EVENT: { ATTEMPT_BLUEDOT: string; FOUND_POSITION: string; FOUND_FLOOR: string; }; } export type { IAnalytics }; export default Analytics; } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinDirections' { import { IDirectionsResult } from '@mappedin/react-native-sdk/sdks/packages/navigator'; import { ACTION_TYPE, BEARING_TYPE } from '@mappedin/react-native-sdk/sdks/packages/navigator/Directive'; import type { MappedinNode, MappedinVortex, MappedinMap, Mappedin } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; export interface IActionDeparture { type: ACTION_TYPE.DEPARTURE; } export interface IActionArrival { type: ACTION_TYPE.ARRIVAL; } export interface IActionTakeVortex { type: ACTION_TYPE.TAKEVORTEX; toMap: MappedinMap; fromMap: MappedinMap; } export interface IActionExitVortex { type: ACTION_TYPE.EXITVORTEX; toMap: MappedinMap; fromMap: MappedinMap; } export interface IActionTurn { type: ACTION_TYPE.TURN; bearing: BEARING_TYPE; referencePosition?: string; } export type IAction = IActionArrival | IActionDeparture | IActionTurn | IActionTakeVortex | IActionExitVortex; /** this is the "overloaded" version of the directive, with get-venue classes instead of stubs */ export type TMappedinDirective = { node: MappedinNode; /** * Distance from the last instruction to the current. Useful for turn by turn navigation */ distance: number; instruction: string; action?: IAction; atLocation?: MappedinVortex; type?: BEARING_TYPE; }; /** * Directions Object */ export class MappedinDirections { #private; /** * Total Distance in meters of the path. */ distance: number; /** * The path as an array of {@link MappedinNode} */ path: MappedinNode[]; /** * An array of {@link MappedinDirective} that contains the instructions to get to the destination, which can be used for text based directions. */ instructions: TMappedinDirective[]; constructor(mappedin: Mappedin, directions: IDirectionsResult); toJSON(): IDirectionsResult; } } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinLocation' { import type { TLocation, TColor, TGalleryImage, TLogo, TOpeningHours, TPhone, TPicture, TSiblingGroup, TSocial } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.API.types'; import type { MappedinNode, MappedinPolygon, MappedinCategory, MappedinLocationState, Mappedin } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; import { MappedinNavigatable, MappedinDirections, MappedinDestinationSet, TDirectionToOptions } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; export function getCurrentLocationState(location: MappedinLocation, states: MappedinLocationState[], date?: Date): MappedinLocationState | undefined; export type TOperationHoursMap = { [key in string]: TOpeningHours[]; }; /** * A {@link MappedinLocation} is something like a store or washroom on a {@link MappedinMap}. It has an ID and will be linked to zero or more {@link MappedinNode}s and {@link MappedinPolygon}s. * * A Location's Nodes and Polygons can be on multiple Maps, or in multiple non-adjacent places on the same Map. * For example, all washroom at a given Venue could belong to one Location, or a department store could live on multiple floors. A Washroom Location might a have a few Polygons spread throughout the Venue for each one that exists, but a single store might just have one presence, and therefore one Polygon. Some Locations just have a single point and only have Nodes. * * A Location can have more properties (typically things like 'name', 'externalId', 'type', 'categories', 'description', 'logo', etc). * * The {@link Mappedin} 'things' object is where you would specify what properties you want to download for Locations. Only specify what you will actually use, to minmimze transfer time. Work with your Mappedin developer relations contact to set up any custom properties you need. * * See below for an example a 'things' object with available Location properties specified: * * things: { * venue: [], * locations: ['venue', 'name', 'type', 'icon', 'logo', 'language', 'externalId', 'description', 'categories', 'phone', 'operationHours', 'social', 'tags', 'parents', 'sortOrder'], * categories: [], * maps: [] * } * * @class MappedinLocation */ export class MappedinLocation extends MappedinNavigatable { #private; static readonly __type = "MappedinLocation"; readonly __type = "MappedinLocation"; static is(instance: object): instance is MappedinLocation; states: TLocation['states']; id: string; name: string; type: string; description?: string; sortOrder?: number; logo?: TLogo; phone?: TPhone; social?: TSocial; color?: TColor; shortName?: string; detailsUrl?: string; tags?: string[]; /** * @internal */ toMap?: string; externalId?: string; showLabelWhenImagePresent?: boolean; showSmartLabelWhenImagePresent?: boolean; picture?: TPicture; operationHours?: TOpeningHours[] | undefined; siblingGroups?: TSiblingGroup[] | undefined; gallery?: TGalleryImage[] | undefined; amenity?: string | undefined; filterFlags?: string[]; constructor(mappedin: Mappedin, data: any); /** * Polygons this Location is attached to. * * @property polygons * @type [MappedinPolygon] */ get polygons(): MappedinPolygon[]; set polygons(polygons: MappedinPolygon[]); /** * Nodes this Location is attached to. * * @property nodes * @type [MappedinNode] */ get nodes(): MappedinNode[]; set nodes(nodes: MappedinNode[]); /** * Parent of this Location, if any. Used in cases where one Location is inside another, more "important" Location. * * @property parent * @type MappedinLocation */ get parent(): MappedinLocation | undefined; set parent(parent: MappedinLocation | undefined); /** * Specific instances of this location with different properties. * Typically, there will be at least one node or polygon defined, * plus one or more other properties that are different from the parent. * The remaining properties will be the same as the parent. * For example, suppose there is a location like this: * * ```json * { * "id": "location-id-1", * "name": "Location 1", * "nodes": ["node-1", "node-2"], * "polygons": ["polygon-1", "polygon-2"], * "externalId": "externalId-1", * "description": "Description 1", * } * ``` * * (Note that for clarity, we have put strings in for nodes and polygons, but in practice they would be objects.) * * Then suppose it had an `instances` array that contained an object that looked like this: * * ```json * { * "id": "instance-id-1", * "name": "Location 1 - A", * "nodes": ["node-1"], * "polygons": ["polygon-1"], * "externalId": "externalId-1-A", * "description": "Description 1", * } * ``` * This says "Location 1" is the parent location, and "Location 1 - A" is an instance of it. The instance has a different name, and a different external ID, and it only applies to node `node-1` and polygon `polygon-1`. * The ID will always be different, but other properties (like the description) are the same as the parent. * * Example use cases: * - A Mall may have a location with two nodes and one polygon. It may then have an instance with one of the nodes, and operating hours * that are different from the parent. This indicates that this instance is an entrance for the location that is accessible at different times, perhaps for an interior mall entrance, when the main location (and other, exterior entrance) is open later than the rest of the mall. * - An airport may have a location with several polygons and nodes, and an instance for each node (and corresponding polygon, if any) with a different siblingGroup. The location in the sibling group may be the airport terminal, or airside vs landside. * This would allow an application to show the location once in a search result, but offer UX to select the instance that is in the right terminal. * * Note: Instances are actual EnterpriseLocations. This means they have all the properties of a normal EnterpriseLocation, including an `instances` property, that will always be undefined. They also do NOT have a parent property, or any other explicit reference to the parent location. These instances are * only referenced from their parent location, and will not show up in other places in the map data. However, they should otherwise behave like normal EnterpriseLocations, being targetable for things like navigation and focus. */ get instances(): MappedinLocation[]; /** * Categories related to this location. * * @property categories * @type [MappedinCategory] */ get categories(): MappedinCategory[]; get state(): MappedinLocationState; clone(): MappedinLocation; get nodeOperationHours(): TOperationHoursMap; static hydrate(locations: any, mappedin: Mappedin): MappedinLocation[]; static updateInPlace(mappedin: Mappedin, hydrateData?: any): Promise; static fetch(mappedin: Mappedin): Promise; /** * * Get Directions to a node, polygon, or location */ directionsTo(destination: MappedinNode | MappedinLocation | MappedinPolygon, options?: TDirectionToOptions): MappedinDirections; directionsTo(destination: MappedinDestinationSet, options?: TDirectionToOptions): MappedinDirections[]; /** * * Calculate distance between 2 nodes, polygons or locations */ distanceTo(destination: MappedinNode | MappedinLocation | MappedinPolygon, options?: TDirectionToOptions): number; toJSON(): any; } } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinCoordinate' { import type { MappedinMap } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; import { Mappedin, MappedinNode } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; export type TMappedinCoordinateOptions = { map: MappedinMap; mappedin: Mappedin; x: number; y: number; lat?: undefined; lon?: undefined; } | { map: MappedinMap; mappedin: Mappedin; x?: undefined; y?: undefined; lat: number; lon: number; }; /** * A {@link MappedinCoordinate} represents a coordinate on a map, created using lat/lon. * * @class MappedinCoordinate */ export class MappedinCoordinate { #private; static readonly __type = "MappedinCoordinate"; readonly __type = "MappedinCoordinate"; static is(instance: object): instance is MappedinCoordinate; /** * The Map that the Node is located on. * * @property map {MappedinMap} */ map: MappedinMap; /** * X coordinate in Mappedin Units * @property x {number} */ get x(): number; /** * Y coordinate in Mappedin Units * @property y {number} */ get y(): number; /** * Latitude */ get lat(): number; /** * Longitude */ get lon(): number; /** * @internal */ constructor(options: TMappedinCoordinateOptions); /** * * Calculate distance between a coordinate and a {@link MappedinNode} or {@link MappedinCoordinate} * * @param destination Destination to measure real distance to * @returns distance in meters */ absoluteDistanceTo(destination: MappedinCoordinate): number; /** * Get Nearest Node to Coordinate, which can then be used for navigation */ get nearestNode(): MappedinNode; /** * Get the {@link MappedinNode}s within a radius of the {@link MappedinCoordinate}. * @param radius - The radius in metres. */ nodesInRadius(radius: number): MappedinNode[]; toJSON(): { x: number; y: number; map: MappedinMap; lat: number; lon: number; }; } } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.OfflineSearch' { import type { SearchOptions } from 'minisearch'; import { MappedinLocation, MappedinCategory, Mappedin } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; export const removeAccents: (it: string) => string; export function tokenizeAndCaptureDelimiters(text: string): string[]; export type { SearchOptions }; /** * A {@link OfflineSearch} is an offline search module * * * @class OfflineSearch */ export type TMappedinOfflineSearchAllOptions = { /** * Array of stopwords to ignore when searching, default: english stopwords */ stopWords?: string[]; /** * Index location tags - typically better to use either tags or descriptions, depending on what's available * @default true */ searchTags?: boolean; /** * Index location descriptions - typically better to use either tags or descriptions, depending on what's available * @default true */ searchDescriptions?: boolean; /** * Also index all tags for every location in every category (caution: this may slow down indexing and search) * @default false */ searchTagsInCategories?: boolean; /** * Also index all tags for every location in every category (caution: this may slow down indexing and search) * @default false */ searchDescriptionsInCategories?: boolean; /** * Initialize Search with a previously indexed JSON string (outputted by OfflineSearch.toJSON()) */ jsonIndex?: string; /** * Use the location polygons' rank in weighing results */ useLocationRank?: boolean; /** * Emit Analytics events when doing search * @default true when running in production */ emitAnalyticsEvents?: boolean; /** * Fine tune search constants */ constants: { /** * Fuzziness index for location names and tags * @default 0.09 */ PRIMARY_INDEX_FUZZYNESS: number; /** * Multiplier for location names (1 by default) * @default 1 */ PRIMARY_INDEX_WEIGHT: number; /** * Multiplier for descriptions * @default 0.025 */ SECONDARY_INDEX_WEIGHT: number; /** * Multiplier for location names * @default 1 */ LOCATION_NAME_WEIGHT: number; /** * Multiplier for category names * @default 0.5 */ CATEGORY_NAME_WEIGHT: number; /** * Multiplier for category locations' descriptions * @default 0.0005 */ CATEGORY_LOCATION_DESCRIPTION_WEIGHT: number; /** * Multiplier for category locations' tags * @default 0.0005 */ CATEGORY_LOCATION_TAGS_WEIGHT: number; /** * Multiplier for category locations' names * @default 0.01 */ CATEGORY_LOCATION_NAME_WEIGHT: number; /** * Multiplier for location tags * @default 0.05 */ PRIMARY_INDEX_TAGS_NAME_WEIGHT: number; /** * Default rank when one isn't available in the data, default = 1 * @default 1 */ LOCATION_DEFAULT_RANK: number; /** * Ratio of Fuzzy Searches of Location names and tags relative to exact * @default 0.01 */ RATIO_OF_FUZZY_TO_EXACT: number; /** * Ratio of Prefix Searches of Location names and tags relative to exact * @default 0.2 */ RATIO_OF_PREFIX_TO_EXACT: number; }; }; export type TMappedinOfflineAllSearchMatch = { /** * The term that was found */ term: string; /** * Term's weight */ weight: number; /** * What field the search matched on */ matchesOn: string; /** * The value of that field */ value?: string; }; export type TMappedinOfflineSearchOptions = Partial; export type TMappedinOfflineSearchResult = { /** * Type describing the object */ type: 'MappedinLocation' | 'MappedinCategory' | 'Custom'; /** * Details on why the result was returned */ matches: TMappedinOfflineAllSearchMatch[]; /** * Found object */ object: MappedinLocation | MappedinCategory | Record; /** * Total score of the result */ score: number; }; export type TMappedinOfflineSearchSuggestions = { /** * Total number of suggestions generated */ total: number; /** * List of suggestions */ hits: { /** * Suggestion text */ text: string; }[]; }; /** * A {@link OfflineSearch} is an offline search module. It can be initialized at any time by passing the {@link Mappedin} object and a set of {@link TMappedinOfflineSearchOptions} options. * * * @class Mappedin.OfflineSearch */ export class OfflineSearch { #private; constructor( /** * Mappedin Venue Object, typically returned by `getVenue`/`showVenue` */ mappedin: Mappedin, options?: TMappedinOfflineSearchOptions); /** * Get Suggestions for term */ suggest( /** * Search term */ term: string): Promise; /** * Search for a term */ search(term: string): Promise; /** * Export search index to JSON for storage/caching - this would avoid having to re-index * on page reload */ toJSON(): Promise; /** * Add a custom query to the search index */ addQuery(params: { /** * Query string to match for this object */ query: string; /** * Object that is returned when query matches */ object: MappedinLocation | MappedinCategory | Record; /** * Optional weight to multiply by the score */ weight?: number; }): Promise; destroy(): void; } } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.API.types' { /** * This file contains the API types for MappedinSDK - before they get turned into Classes */ export type TLocationType = 'amenities' | 'tenant'; export type TNode = { id: string; x: number; y: number; map: string; externalId?: string; paths: { node: string; map: string; weight?: number; }[]; [propName: string]: any; }; export type TImage = { original?: string; large?: string; '140x140'?: string; xxlarge?: string; xsmall?: string; '66x66'?: string; xlarge?: string; medium?: string; xxsmall?: string; small?: string; }; export type TLogo = TImage; export type TGalleryImage = { image: TImage; caption?: string; }; export type TPhone = { number?: string; }; export type TSocial = { website?: string; twitter?: string; facebook?: string; instagram?: string; }; export type TColor = { hex: string; opacity: number; rgba: string; }; export type TVortex = { id: string; name: string; type: string; weight: number; multiplier: number; [propName: string]: any; }; export type TPicture = { original?: string; }; export type TOpeningHours = { '@type': string; opens: string; closes: string; dayOfWeek: string[]; validFrom?: string; validThrough?: string; }; export type TSiblingGroup = { label: string; siblings: string[]; }; export type TState = { type: string; start?: string; end?: string; }; export type TCategory = { name?: string; externalId?: string; parents?: string[]; id?: string; icon?: TPicture; }; export type TEvent = { id: string; type: string; name: string; location?: string; description?: string; image?: TImage; startDate?: number; endDate?: number; showDate?: number; }; export interface TGeoReference { target: { x: number; y: number; }; control: { x: number; y: number; }; } export interface TMap { id: string; name: string; shortName: string; elevation?: number; scale?: number; x_scale?: number; georeference?: TGeoReference[]; [propName: string]: any; } export type TMapGroup = { name: string; id: string; }; export type TBuilding = TLocation & { groupId: string; }; export type TLocation = { id: string; name: string; type: string; nodes: { map: TMap['id']; node: TNode['id']; }[]; polygons: { map: TMap['id']; id: TPolygon['id']; }[]; categories: string[]; description?: string; sortOrder?: number; logo?: TLogo; phone?: TPhone; social?: TSocial; color?: TColor; shortName?: string; detailsUrl?: string; parent?: string | null; tags?: string[]; externalId?: string; picture?: TPicture; states?: TState[]; operationHours?: TOpeningHours[] | undefined; siblingGroups?: TSiblingGroup[] | undefined; gallery?: TGalleryImage[] | undefined; [propName: string]: any; }; export type TPolygon = { id: string; map: string; layer?: string; layerId?: string; externalId?: string; name?: string; entrances: { map: TMap['id']; id: TNode['id']; }[]; }; export type TPolygonRanking = { polygonId: string; entranceNodeId: string; score: number; }; export type TLocationState = { id: string; name: string; value: string; }; export type TVenue = { address?: string; city?: string; countrycode?: string; defaultMap?: string; externalId?: string; id?: string; latitude?: number; logo?: TLogo; longitude?: number; metadata?: any; name?: string; operationHours?: TOpeningHours[]; postal?: string; slug?: string; state?: string; telephone?: string; tzid?: string; tzidOverride?: string; utcOffset?: string; website?: string; }; export type TMappedinAPI = { nodes: TNode[]; locations: TLocation[]; categories: TCategory[]; mapGroups: TMapGroup[]; polygons: TPolygon[]; maps: TMap[]; themes: any; venue: TVenue; vortexes: TVortex[]; locationStates?: TLocationState[]; imageBinaries?: Map; }; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/FlatLabelsController' { import { TAddFlatLabelOptions, TFlatLabelAllLocationsOptions, TFlatLabelAppearance, ICore, FlatLabel } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { MappedinPolygon } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; export const LABEL_ALL_LOCATIONS_WARNING = "Adding or removing individual labels after calling labelAllLocations() may cause unexpected behaviour. We recommend adding all labels individually if more specific control is desired. https://developer.mappedin.com/web-sdk-api/v5/latest/classes/flatlabels#add"; export type FlatLabelRenderObject = TAddFlatLabelOptions & { polygon: MappedinPolygon; text: string; shortText?: string; stateText?: string; distance?: number; showLabelWhenImagePresent?: boolean; }; class FlatLabelsController { #private; core: ICore; constructor(core: ICore); flatLabels: { [key in MappedinPolygon['id']]: FlatLabel; }; labeledPolygons: {}; labelAllLocations(options?: TFlatLabelAllLocationsOptions): FlatLabel[]; labelPolygon(polygonOrPolygonId: MappedinPolygon | MappedinPolygon['id'], text: string, options?: TAddFlatLabelOptions): any; removeLabel(polygonOrPolygonId: MappedinPolygon | MappedinPolygon['id'], { warnOnLabelAllLocations }?: { warnOnLabelAllLocations?: boolean; }): void; setAppearance(polygon: MappedinPolygon, appearance: TFlatLabelAppearance): void; setHoverColorForAll(color: string): void; removeAllLabels(): void; } export default FlatLabelsController; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/FloatingLabelsController' { import { InternalFloatingLabel } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import type { ICore, TFloatingLabelAllLocationsOptions, TAddFloatingLabelOptions, TFloatingLabelAppearance } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { MappedinPolygon, MappedinCoordinate, MappedinNode } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; /** * A floating label that is attached to a node or coordinate on the map. */ export class FloatingLabel { #private; /** * @hidden * @internal */ constructor(internalFloatingLabel: InternalFloatingLabel); /** * The ID of this label. */ get id(): string; /** * The text of this label. */ get text(): string; /** * The {@link TFloatingLabelAppearance} options of this label with defaults. */ get appearance(): Required; /** * The {@link MappedinNode} or {@link MappedinCoordinate} that this label is attached to. */ get nodeOrCoordinate(): MappedinNode | MappedinCoordinate; /** * The collision rank of this label. */ get rank(): number; /** * @hidden * @internal */ __updateInstance(internalFloatingLabel: InternalFloatingLabel): void; /** * Object representation of this label. */ toJSON(): { id: string; text: string; appearance: Required; nodeOrCoordinate: any; rank: number; }; } class FloatingLabelsController { #private; core: ICore; internalFloatingLabels: Record; internalFloatingLabelsByNodeOrCoordinate: WeakMap; floatingLabels: Record; constructor(core: ICore); addLabel(target: MappedinPolygon, text: string, options?: TAddFloatingLabelOptions): FloatingLabel[]; addLabel(target: MappedinNode | MappedinCoordinate, text: string, options?: TAddFloatingLabelOptions): FloatingLabel; removeLabel(target: MappedinPolygon | MappedinNode | MappedinCoordinate, bulk?: boolean): void; setPriority(target: MappedinPolygon | MappedinNode | MappedinCoordinate, rank: number): void; resetPriority(target: MappedinPolygon | MappedinNode | MappedinCoordinate): void; removeAllLabels(): void; setAppearance(target: MappedinPolygon | MappedinNode | MappedinCoordinate, appearance: TFloatingLabelAppearance): void; labelAllLocations(options?: TFloatingLabelAllLocationsOptions): FloatingLabel[]; } export default FloatingLabelsController; } declare module '@mappedin/react-native-sdk/sdks/packages/navigator/NavigationGraph' { import Edge from '@mappedin/react-native-sdk/sdks/packages/navigator/Edge'; import IMap from '@mappedin/react-native-sdk/sdks/packages/navigator/interfaces/IMap'; import INode from '@mappedin/react-native-sdk/sdks/packages/navigator/interfaces/INode'; import IVortex from '@mappedin/react-native-sdk/sdks/packages/navigator/interfaces/IVortex'; export function getMapScale(map: IMap): number; export function getAngle(origin: INode, destination: INode): number; class NavigationGraph { edges: { [propName: string]: Edge[]; }; nodesById: { [propName: string]: INode; }; mapsById: { [propName: string]: IMap; }; constructor({ nodes, vortexes, maps, showVortexNames, }: { nodes: INode[]; vortexes: IVortex[]; maps: IMap[]; showVortexNames?: boolean; }); /** * aStar takes one or more origin node ids, one or more destination node ids * and returns an array of nodes that define the shortest path from an origin * a destination. * * @param originIds array - of one or more node ids * @param destinationNodeIds array - of onr or more node ids * @param accessible boolean - optional, if true directions will only take accessible route, defaults to false * @param includedVortexIds set - optional, exclude all the vertexes matching the given IDs * @param excludedVortexIds set - optional, exclude all the vertexes matching the given IDs * @param excludedNodeIds set - optional, exclude all the nodes matching the given IDs */ aStar({ originIds, destinationNodeIds, accessible, includedVortexIds, excludedVortexIds, excludedNodeIds, }: { originIds: string[]; destinationNodeIds: string[]; accessible: boolean; includedVortexIds?: Set; excludedVortexIds?: Set; excludedNodeIds?: Set; }): Edge[]; getDistance(origin: INode, destination: INode): number; getShortestEuclideanDistance(origin: INode, destinations: INode[]): number; } export default NavigationGraph; } declare module '@mappedin/react-native-sdk/sdks/packages/navigator/Navigator' { import Directive from '@mappedin/react-native-sdk/sdks/packages/navigator/Directive'; import Edge from '@mappedin/react-native-sdk/sdks/packages/navigator/Edge'; import { TCoordinate } from '@mappedin/react-native-sdk/sdks/packages/navigator/Navigator.utils'; import ILocation from '@mappedin/react-native-sdk/sdks/packages/navigator/interfaces/ILocation'; import IMap from '@mappedin/react-native-sdk/sdks/packages/navigator/interfaces/IMap'; import INode from '@mappedin/react-native-sdk/sdks/packages/navigator/interfaces/INode'; import IPolygon from '@mappedin/react-native-sdk/sdks/packages/navigator/interfaces/IPolygon'; import IVortex from '@mappedin/react-native-sdk/sdks/packages/navigator/interfaces/IVortex'; export enum E_MESSAGES { NO_VALID_PATH = "No Valid Path Available" } export function differenceBetweenAngles(a: any, b: any): number; export interface IDirectionsResult { distance: number; path: INode[]; instructions: Directive[]; } /** * @experimental * Configuration options for directions simplifying. */ export type TSimplifyDirectionsOptions = { /** * Enable or disable simplifying. */ enabled: boolean; /** * The radius of the buffer around the path. * @default 1.8 */ bufferRadius?: number; }; class Navigator { constructor({ locations, nodes, vortexes, maps, polygons, showVortexNames, }: { locations: ILocation[]; nodes: INode[]; vortexes: IVortex[]; maps: IMap[]; polygons?: IPolygon[]; showVortexNames?: boolean; }); getClosestLocationInRay(startingEdge: Edge, angleThreshold?: number, distanceThreshold?: number): ILocation; /** * getDirections takes one or more origin node ids, one or more destination node ids * and returns a distance, array of directives, and an array of nodes that define the * path to take. * * The returned directives array defines nodes, vortexes, and locations along the path * along with text directions. * * @param originIds array - of one or more node ids * @param destinationNodeIds array - of onr or more node ids * @param accessible boolean - optional, if true directions will only take accessible route, defaults to false * @param departFrom ILocation - optional, id and name of a location to represent start of journey * @param arriveAt ILocation - optional, id and name of a location to represent end of journey * @param includedVortexIds set - optional, exclude all the vertexes matching the given IDs * @param excludedVortexIds set - optional, exclude all the vertexes matching the given IDs */ getDirections({ originIds, destinationNodeIds, accessible, departFrom, arriveAt, includedVortexIds, excludedVortexIds, excludedNodeIds, simplify, }: { originIds: string[]; includedVortexIds?: Set; excludedVortexIds?: Set; excludedNodeIds?: Set; destinationNodeIds: string[]; accessible: boolean; departFrom?: ILocation; arriveAt?: ILocation; simplify?: TSimplifyDirectionsOptions; }): IDirectionsResult; /** * Iterates through each N step node and determines if a direct line to the next M step node intersects any polygons. * If it doesn't, remove all steps between the two. */ simplifySteps(steps: Edge[], geometryEdges: TCoordinate[][], bufferRadius: number): Edge[]; } export default Navigator; } declare module '@mappedin/react-native-sdk/sdks/packages/navigator/Directive' { import ILocation from '@mappedin/react-native-sdk/sdks/packages/navigator/interfaces/ILocation'; import IMap from '@mappedin/react-native-sdk/sdks/packages/navigator/interfaces/IMap'; import INode from '@mappedin/react-native-sdk/sdks/packages/navigator/interfaces/INode'; export enum ACTION_TYPE { DEPARTURE = "Departure", TAKEVORTEX = "TakeVortex", EXITVORTEX = "ExitVortex", TURN = "Turn", ARRIVAL = "Arrival" } export enum BEARING_TYPE { STRAIGHT = "Straight", RIGHT = "Right", SLIGHTRIGHT = "SlightRight", LEFT = "Left", SLIGHTLEFT = "SlightLeft" } export enum VORTEX_DIRECTION_TYPE { UP = "up", DOWN = "down", NONE = "none" } interface IActionDeparture { type: ACTION_TYPE.DEPARTURE; } interface IActionArrival { type: ACTION_TYPE.ARRIVAL; } interface IActionTakeVortex { type: ACTION_TYPE.TAKEVORTEX; toMap: IMap; fromMap: IMap; direction: VORTEX_DIRECTION_TYPE; } interface IActionExitVortex { type: ACTION_TYPE.EXITVORTEX; toMap: IMap; fromMap: IMap; } interface IActionTurn { type: ACTION_TYPE.TURN; bearing: BEARING_TYPE; referencePosition?: string; } export type IAction = IActionArrival | IActionDeparture | IActionTurn | IActionTakeVortex | IActionExitVortex; class Directive { node?: INode; instruction: string; action?: IAction; atLocation?: ILocation; type?: BEARING_TYPE; distance: number; constructor({ origin, action, distance, atLocation, instruction, }: { origin?: INode; action?: IAction; distance?: number; atLocation?: ILocation; instruction?: string; }); } export default Directive; } declare module '@mappedin/react-native-sdk/sdks/packages/common/Mappedin.Logger' { export const MI_DEBUG_KEY = "mi-debug"; export enum E_SDK_LOG_LEVEL { LOG = 0, WARN = 1, ERROR = 2, SILENT = 3 } export function setLoggerLevel(level: E_SDK_LOG_LEVEL): void; const Logger: { logState: E_SDK_LOG_LEVEL; log(...args: any[]): void; warn(...args: any[]): void; error(...args: any[]): void; assert(...args: any[]): void; time(label: string): void; timeEnd(label: string): void; }; export default Logger; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal' { import { Texture } from 'three'; import { STACKED_MAPS_STATE, STATE } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.enums'; import { TMapClickEvent } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types'; import { MappedinMap } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import { Vector3 } from '@mappedin/mvf'; export { MappedinMap, Mappedin, MappedinCoordinate, MappedinPolygon, MappedinNode, MappedinLocation, MappedinVenue, findPreferredLanguage, } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; export type { TEnableBlueDotOptions, TFloatingLabelAppearance, TGeolocationObject, TPathOptions, TConnectionProps, TConnectionTemplateFn, TMarkerTemplateProps, TMarkerTemplateFn, TJourneyOptions, TPadding, TCreateMarkerOptions, TAnimationOptions, TCreateTooltipInternalOptions, TCreateTooltipCommonOptions, TCreateTooltipOptions, TCreateTextTooltipOptions, TCreateCustomInnerHTMLTooltipOptions, TCreateCustomTooltipOptions, TCreateThreeDMarkerOptions, TGetPolygonsAtCoordinateOptions, TMapViewOptions, TMapViewOptionsLegacy, TFlatLabelOptions, TFlatLabelAppearance, TFloatingLabelPolygonOptions, TAddFlatLabelOptions, TAddFloatingLabelOptions, TLabelAllLocationCommonOptions, TLabelAllLocationFloatingLabelOptions, TLabelAllLocationFlatLabelOptions, TFloatingLabelAllLocationsOptions, TFlatLabelAllLocationsOptions, changeListenerFn, TMapClickEvent, E_SDK_EVENT_PAYLOAD, E_BLUEDOT_EVENT_PAYLOAD, CAMERA_EVENT_PAYLOAD, TStackedMapsOptions, } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types'; export { labelThemes } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types'; export { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, E_BLUEDOT_STATE_REASON, E_BLUEDOT_STATE, E_BLUEDOT_MARKER_STATE, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT, E_CAMERA_DIRECTION, SAFE_AREA_INSET_TYPE, CAMERA_EASING_MODE, ANIMATION_TWEENS, STACKED_MAPS_STATE, } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.enums'; export { MAP_RENDER_MODE } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; export { default as JSONSceneLoader } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/json-scene-loader'; export { default as RENDER } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.RenderTasks'; export { FrameUpdate, FrameTask, TaskScheduler } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.TaskScheduler'; export { default as SceneManager } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/scene-manager/MapView.SceneManager'; export { default as DynamicFocusSceneManager } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/scene-manager/MapView.DynamicFocusSceneManager'; export { PubSub } from '@mappedin/react-native-sdk/sdks/packages/get-venue/pub-sub.typed'; export { default as MapObject } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.MapObject'; export { default as CAMERA_LAYER } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.CameraLayers'; export { default as AssetManager } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.AssetManager'; export { BundleAssetManager } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/bundle-asset-manager'; /** * Internal Events and Payloads */ export enum INTERNAL_EVENT { ON_FIRST_MAP_LOADED = 0, TEXTURE_LOADED = 1, RENDER = 2, RENDER_NOW = 3, UPDATE_FLIPPABLES = 4, SET_SCENE_MAP = 5, SET_SCENE_START = 6, SET_SCENE = 7, SCENE_VISIBLITY_CHANGED = 8, CAMERA_MOVING = 9, SET_BLUE_DOT_SIZE_FROM_ZOOM = 10, PUBLISH_BLUE_DOT = 11, SET_STATE_SILENT = 12, BLUE_DOT_UPDATE_POSITION = 13, BLUE_DOT_SET_FOLLOWING = 14, CLEAR_MOUSE = 15, MAP_CLICK = 16, USER_ZOOM = 17, USER_ZOOM_BEGIN = 18, USER_ROTATE = 19, USER_ROTATE_BEGIN = 20, USER_PAN = 21, USER_PAN_BEGIN = 22, USER_TILT = 23, USER_MULTI_BEGIN = 24, USER_MULTI_END = 25, FOCUSON_BEGIN = 26, USER_HANDS_ON = 27, USER_HANDS_OFF = 28, JOURNEY_CREATED = 29, JOURNEY_DESTROYED = 30, OUTDOOR_VIEW_LOADED = 31, LAYER_VISIBILITY_CHANGED = 32, USER_INTERACTION_START = 33, USER_INTERACTION_END = 34, STACKED_MAPS_STATE_CHANGE = 35 } export type INTERNAL_EVENT_PAYLOAD = { [INTERNAL_EVENT.SET_SCENE_START]: undefined; [INTERNAL_EVENT.SET_SCENE_MAP]: undefined; [INTERNAL_EVENT.ON_FIRST_MAP_LOADED]: undefined; [INTERNAL_EVENT.TEXTURE_LOADED]: Texture; [INTERNAL_EVENT.OUTDOOR_VIEW_LOADED]: undefined; [INTERNAL_EVENT.RENDER]: undefined; [INTERNAL_EVENT.RENDER_NOW]: undefined; [INTERNAL_EVENT.UPDATE_FLIPPABLES]: undefined | boolean; [INTERNAL_EVENT.SET_SCENE]: { context?: string; }; [INTERNAL_EVENT.CAMERA_MOVING]: { position: Vector3; tilt: number; rotation: number; zoom: number; }; [INTERNAL_EVENT.SET_BLUE_DOT_SIZE_FROM_ZOOM]: number; [INTERNAL_EVENT.PUBLISH_BLUE_DOT]: undefined; [INTERNAL_EVENT.CLEAR_MOUSE]: undefined; [INTERNAL_EVENT.SET_STATE_SILENT]: { state: STATE; }; [INTERNAL_EVENT.BLUE_DOT_UPDATE_POSITION]: { x: number; y: number; }; [INTERNAL_EVENT.BLUE_DOT_SET_FOLLOWING]: boolean; [INTERNAL_EVENT.MAP_CLICK]: TMapClickEvent; [INTERNAL_EVENT.USER_ZOOM]: undefined; [INTERNAL_EVENT.USER_ZOOM_BEGIN]: undefined; [INTERNAL_EVENT.USER_ROTATE_BEGIN]: undefined; [INTERNAL_EVENT.USER_MULTI_BEGIN]: undefined; [INTERNAL_EVENT.USER_PAN_BEGIN]: undefined; [INTERNAL_EVENT.USER_ROTATE]: undefined; [INTERNAL_EVENT.USER_MULTI_END]: undefined; [INTERNAL_EVENT.FOCUSON_BEGIN]: undefined; [INTERNAL_EVENT.USER_HANDS_ON]: undefined; [INTERNAL_EVENT.USER_HANDS_OFF]: undefined; [INTERNAL_EVENT.USER_INTERACTION_START]: undefined; [INTERNAL_EVENT.USER_INTERACTION_END]: undefined; [INTERNAL_EVENT.USER_PAN]: undefined; [INTERNAL_EVENT.USER_TILT]: undefined; [INTERNAL_EVENT.LAYER_VISIBILITY_CHANGED]: MappedinMap; [INTERNAL_EVENT.JOURNEY_CREATED]: undefined; [INTERNAL_EVENT.JOURNEY_DESTROYED]: undefined; [INTERNAL_EVENT.SCENE_VISIBLITY_CHANGED]: undefined; [INTERNAL_EVENT.USER_INTERACTION_START]: undefined; [INTERNAL_EVENT.USER_INTERACTION_END]: undefined; [INTERNAL_EVENT.STACKED_MAPS_STATE_CHANGE]: STACKED_MAPS_STATE; }; /** * Factories */ export { Atlas, FlatLabel } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.LabelAtlas.js'; export { default as HoverLabel } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.HoverLabel'; export { default as BaseCollider } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.SmartCollider'; export { default as InternalFloatingLabel } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.FloatingLabel'; export { default as HTMLCollider } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.HTMLCollider'; export { Marker } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/MarkersController'; export { default as SmartTooltip } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.SmartTooltip'; export { default as InternalMarker } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.Marker'; export { ThreeJSMarkerHandle } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.MapObject'; export { default as MapViewScene } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/scene-manager/MapView.Scene'; export { default as MapViewStackScene } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/scene-manager/MapView.StackScene'; export { default as Element } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.Element'; export { default as FlippableImage } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.FlippableImage'; export { default as Building } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/scene-manager/dynamic-focus-scene-manager/building'; export { default as DynamicFocusScene } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/scene-manager/dynamic-focus-scene-manager/dynamic-focus-scene'; /** * Controllers/Managers */ export { default as PathsController, Path } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/PathsController'; export { default as FloatingLabelsController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/FloatingLabelsController'; export { default as FlatLabelsController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/FlatLabelsController'; export { default as PolygonColorsController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/PolygonColorsController'; export { default as PolygonHoverColorsController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/PolygonHoverColorsController'; export { default as MarkersController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/MarkersController'; export { default as PolygonInteractionController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/PolygonInteractionController'; export { default as TooltipsController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/TooltipsController'; export { default as PolygonStatesController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/PolygonStatesController'; export { default as PolygonImagesController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/PolygonImagesController'; export { default as ThreeDMarkersController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/ThreeDMarkersController'; export { default as BlueDotController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/BlueDotController'; export { default as BlueDotManager } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/blue-dot-manager'; export { default as CameraController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/CameraController'; export { default as EventSystem } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/EventSystem'; export { default as ClosedPolygonManager } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.ClosedPolygonManager'; export { default as BinaryAssetManager } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.BinaryAssetManager'; export { default as SmartCollisionEngine } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.SmartCollisionEngine'; export { default as BillboardManager } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/BillboardManager'; export { default as StackedMapsController, setStackedMapsOverviewTiltInDegrees, } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/StackedMapsController'; export { MultiBufferRenderer } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.Renderer'; export { JourneyController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/JourneyController'; export { default as OutdoorViewController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/OutdoorViewController'; export { default as ExportController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/ExportController'; export { default as WatermarkController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/WatermarkController'; export { default as LayerController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/LayerController'; /** * Types */ export type { TSceneTransitionOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/scene-manager/MapView.SceneManager'; export type { IBlueDotCore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core'; export type { IPositionUpdater } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types'; export type { TSafeAreaInsets, TCameraTargets, TFocusOnCameraOptions, TCameraTransform, TCameraAnimationOptions, } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/CameraController'; export type { TColliderPosition } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.SmartCollider'; export type { ICollider, TColliderStrategy } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.SmartCollider'; export { EColliderAction } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.SmartCollider'; export type { IHTMLCollider } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.HTMLCollider'; export { COLLIDER_STRATEGY_LOW_PRIORITY } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.SmartCollisionEngine'; export { default as BlueDotCore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core'; export { default as BlueDotUI } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.ui'; export { default as CameraControls } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.CameraControls.js'; export { default as Renderer } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.Renderer.js'; export { determineStartingMap, getObject, getObjectId } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/utils'; export { default as MapManager } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.MapManager'; export { default as DebugUI } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.DebugUI'; export { DebugUIScalarSlider, DebugUIColorPicker } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.DebugUIControl'; export type { Collider, ColliderQuadTree } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.SmartCollisionEngine'; export { MapView } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/MapView'; export { default as Logger } from '@mappedin/react-native-sdk/sdks/packages/common/Mappedin.Logger'; export { TileManager, TILE_COLOR } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/outdoor-context/Mappedin.TileManager'; export type { ICore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/Core.interface'; export * from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/Core'; const setAssetManager: any; export { setAssetManager }; export let MAPLIBRE_WORKER_URL: string; export function setMaplibreWorkerURL(url: string): void; } declare module '@mappedin/react-native-sdk/sdks/cms/src' { import { MapView } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/MapView'; import type { Mappedin, MappedinMap, TGetVenueBundleOptions, TGetVenueOptions } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import { getVenue, getVenueMVF, getVenueBundle, getVenueMaker, downloadBundle, getVenueBundleURL, downloadVenueBundleMVF, MappedinDestinationSet, hydrateVenue, GET_VENUE_EVENT } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import type { TMapViewOptions, TShowWatermarkOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types'; export { E_SDK_LOG_LEVEL, setLoggerLevel } from '@mappedin/react-native-sdk/sdks/packages/common/Mappedin.Logger'; export type { Marker } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/MarkersController'; export type { Path } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/PathsController'; export type { FloatingLabel } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/FloatingLabelsController'; export { BEARING_TYPE, ACTION_TYPE } from '@mappedin/react-native-sdk/sdks/packages/navigator'; export type { IDirectionsResult, TSimplifyDirectionsOptions, E_MESSAGES as E_GET_DIRECTIONS_MESSAGES, } from '@mappedin/react-native-sdk/sdks/packages/navigator'; /** * APIs for TypeDoc */ export type { IFlatLabels, FlatLabels } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/FlatLabels'; export type { IFloatingLabels, FloatingLabels } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/FloatingLabels'; export type { Camera } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Camera'; export type { BlueDot } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/BlueDot'; export type { Markers } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Markers'; export type { Paths } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Paths'; export type { StackedMaps } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/StackedMaps'; export type { OutdoorView } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/OutdoorView'; export type { DynamicFocus } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/DynamicFocus'; export type { Layers } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Layers'; export type { TOOLTIP_ANCHOR } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.SmartTooltip'; export { setStackedMapsOverviewTiltInDegrees } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; export type TMappedinInitializeOutput = { mapView: MapView; venue: Mappedin; }; type _TGetVenueOptions = TGetVenueOptions & { useVenueBundle?: false | undefined; }; type _TGetVenueBundleOptions = TGetVenueBundleOptions & { useVenueBundle: true; }; type TMappedinInitializeOptions = { mapView?: TMapViewOptions; venue: _TGetVenueOptions | _TGetVenueBundleOptions; firstMapSelector?: (venue: Mappedin) => MappedinMap | MappedinMap['id']; }; /** * * @param el HTML Element where the mapView should be placed * @param venue Venue Object returned by {@link getVenue} * @param options MapView Options * @returns */ function showVenue(el: HTMLElement, venue: T, options?: TMapViewOptions): Promise; export { COLLISION_RANKING_TIERS, STATE, E_SDK_EVENT, E_BLUEDOT_STATE_REASON, E_BLUEDOT_MARKER_STATE, E_BLUEDOT_EVENT, E_BLUEDOT_STATE, E_CAMERA_EVENT, E_CAMERA_DIRECTION, SAFE_AREA_INSET_TYPE, ANIMATION_TWEENS, CAMERA_EASING_MODE, STACKED_MAPS_STATE, MARKER_ANCHOR, GEOLOCATION_STATUS, E_MAP_CHANGED_REASON, } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.enums'; export { getVenue, getVenueMVF, getVenueBundle, getVenueMaker, showVenue, downloadBundle, getVenueBundleURL, downloadVenueBundleMVF, hydrateVenue, MappedinDestinationSet, GET_VENUE_EVENT, }; import DefaultAssetManager from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.AssetManager'; import type { TTileManagerOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/outdoor-context/Mappedin.TileManager'; export { setAssetManager } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; export { DefaultAssetManager as AssetManager }; export type { TMappedinDirective, IAction, IActionArrival, IActionDeparture, IActionExitVortex, IActionTakeVortex, IActionTurn, } from '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinDirections'; export type { TMappedinInitializeOptions }; export * from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types'; export type { MapView } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/MapView'; export type { TSafeAreaInsets, TCameraTargets, TFocusOnCameraOptions, TCameraTransform, TCameraInteractionsSetOptions, TCameraAnimationOptions, default as CameraController, } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/CameraController'; export type { TGetVenueOptions, TGetVenueBundleOptions, TGetVenueMVFOptions, TGetVenueMakerOptions, TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineAllSearchMatch, TMappedinOfflineSearchAllOptions, TDirectionToOptions, TPicture, TImage, TColor, TGalleryImage, TOpeningHours, TPhone, TSiblingGroup, TSocial, TState, TGeoReference, TPolygonRanking, TOperationHoursMap, TAccessors, } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; export { Mappedin, MappedinDirections, MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinRankings, MappedinNavigatable, MappedinCoordinate, OfflineSearch, MAP_RENDER_MODE, setFetchFn, MappedinCollectionType, MappedinLocationState, } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; /** * Export this only so our internal pre-built products can use it. We don't want to document it for external developers. */ export { CustomerAnalytics } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; /** * Exported but marked as @internal. */ export { BundleAssetManager } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/bundle-asset-manager'; /** * @deprecated Use {@link OutdoorView} instead. * Enable Tile Manager to render outdoor tiles around the venue. Must be called before {@link showVenue}. * * @example * ```ts * __enableTileManager({ * provider: new AzureOutdoorContextProvider( * venue.options.language, * 256, * "Your Azure API Key", * undefined //Omitted when using API Key. * ) * }); * ``` */ export function __enableTileManager(options?: TTileManagerOptions): void; /** * @hidden * @internal * * Show a Mappedin logo in the 3D scene. Must be called before {@link showVenue}. */ export function __showWatermark(options?: TShowWatermarkOptions): void; export type { TTileManagerOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/outdoor-context/Mappedin.TileManager'; export { TILE_RENDER_MODES } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/outdoor-context/Mappedin.TileManager'; export { AzureOutdoorContextProvider, OpenStreetMapOutdoorContext, } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/outdoor-context/Outdoor-Context.provider'; export type { IOutdoorContextProvider } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/outdoor-context/Outdoor-Context.provider'; export { setMaplibreWorkerURL, findPreferredLanguage } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/WatermarkController' { import { ICore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/Core.interface'; import type { TShowWatermarkOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types'; class WatermarkController { #private; static ENABLED: boolean; static OPTIONS: Required; /** * The current calculated position and size of the watermark on the screen. It is updated every resize. * This is public so it can be used in event system. */ position: { x: number; y: number; width: number; height: number; }; constructor(core: ICore); show: () => void; hide: () => void; resize: () => void; } export default WatermarkController; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/PolygonHoverColorsController' { import { MappedinPolygon } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { ICore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/Core.interface'; class PolygonHoverColorsController { #private; constructor(core: ICore); setPolygonHoverColor(polygonOrPolygonId: MappedinPolygon | string, color: string): void; clearPolygonHoverColor(polygonOrPolygonId: MappedinPolygon | string): void; clearAllPolygonHoverColors(): void; } export default PolygonHoverColorsController; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/shave-text' { export type TDrawFn = (ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, x: number, y: number) => void; type TShave = (str: string, size: number, maxWidth: number, maxLines?: number, lineHeight?: number, options?: { strokeText: boolean; }) => { maxWidth: number; maxHeight: number; lines: number; draw: TDrawFn; }; export const getMeasureCanvas: () => { measureCanvas: HTMLCanvasElement; measureCanvasContext: CanvasRenderingContext2D; }; export const shaveText: TShave; export {}; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.StateMachine' { import { IPubSub } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/pub-sub'; import { E_BLUEDOT_STATE, E_BLUEDOT_MARKER_STATE } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; /** What we just learned about the user's position. */ export enum ACTION { gotPosition = 0, gotPositionWithFloor = 1, gotError = 2, timedOut = 3, disabledBlueDot = 4, enabledBlueDot = 5 } export interface IStateMachine extends IPubSub { state: E_BLUEDOT_STATE; markerState: E_BLUEDOT_MARKER_STATE | undefined; transition: (action: ACTION) => void; reset: () => void; } export enum STATEMACHINE_EVENT { stateChanged = 0, markerStateChanged = 1 } const StateMachine: () => IStateMachine & IPubSub; export default StateMachine; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/JourneyController' { import type Directive from '@mappedin/react-native-sdk/sdks/packages/navigator/Directive'; import type INode from '@mappedin/react-native-sdk/sdks/packages/navigator/interfaces/INode'; import { Path } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import type { TJourneyOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { MappedinDirections } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import Core from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/Core'; export type TMappedinDirections = { distance: number; path: INode[]; instructions: Directive[]; }; /** * * The Journey class represents a journey from point A to point B. This includes any intermediate connections, such as stairs or elevators. * The idea is to provide a higher level API with enough hooks to customize the experience. Also, to ensure only 1 journey is allowed at once. * This version does not support "stacked view" - but that can be added in the future * * @internal */ export class JourneyController { #private; distance: number; accessible: boolean; activeDirections: MappedinDirections; get isMultiFloor(): boolean; get mapsInJourney(): import("../../internal").MappedinMap[]; get mapsIdsInJourney(): string[]; get buildingsInJourney(): {}; get mapIdsInvolvedInJourney(): string[]; constructor(directions: MappedinDirections | MappedinDirections[], options: TJourneyOptions, core: Core); setStep: (step: any) => void; setStepByPath: (path: Path) => void; overviewPathMode: 'never' | 'always' | 'current-elevation-and-mapgroup' | 'current-elevation'; setOverviewPathMode(mode: 'never' | 'always' | 'current-elevation-and-mapgroup' | 'current-elevation'): void; static instance: JourneyController | null; static create(directions: MappedinDirections | MappedinDirections[], options: any, core: Core): JourneyController; destroy(): void; } } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/Core' { import '../internal/externals/globalThisPolyfill'; import { Color, Mesh, PerspectiveCamera, Scene, Vector2, Vector3, Raycaster } from 'three'; import '../internal/object3D.destroy'; import type { TGetPolygonsAtCoordinateOptions, TMapViewOptions, TPadding, MappedinPolygon, MapManager, FlatLabel, INTERNAL_EVENT_PAYLOAD, MapView } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { Renderer, TaskScheduler, SmartCollisionEngine, PubSub, INTERNAL_EVENT, STATE, MapObject, SceneManager, TileManager, PathsController, FloatingLabelsController, FlatLabelsController, PolygonColorsController, MarkersController, PolygonInteractionController, TooltipsController, PolygonStatesController, PolygonImagesController, ThreeDMarkersController, EventSystem, BlueDotController, CameraController, BillboardManager, StackedMapsController, OutdoorViewController, WatermarkController, PolygonHoverColorsController, ExportController, LayerController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import type { Mappedin as IMappedin, MappedinCoordinate, MappedinMap, MappedinNode } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import type { E_MAP_CHANGED_REASON } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.enums'; import type { PerformanceController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/PerformanceController'; export const raycaster: Raycaster; let Mappedin: any; /** * Some preset orderings for updates. */ export const UPDATE_ORDERING: { BEFORE_CAMERA: number; CAMERA: number; AFTER_CAMERA: number; RENDER: number; AFTER_RENDER: number; AFTER_ALL_UPDATES: number; }; type TCoreColors = { defaultHover2D: string; select: string; text: string; path: string; pathPulse: string; textSelect: string; }; class Core extends PubSub { #private; /** * Controllers */ eventSystem: EventSystem; floatingLabels: FloatingLabelsController; flatLabels: FlatLabelsController; paths: PathsController; polygonColors: PolygonColorsController; polygonHoverColors: PolygonHoverColorsController; polygonInteraction: PolygonInteractionController; polygonStates: PolygonStatesController; polygonImages: PolygonImagesController; markers: MarkersController; tooltips: TooltipsController; threeDMarkers: ThreeDMarkersController; blueDot: BlueDotController; camera: CameraController; outdoorViewController?: OutdoorViewController; exportController: ExportController; watermark: WatermarkController; layerController: LayerController; options: TMapViewOptions & { onDataLoaded?: (data: IMappedin) => void; onFirstMapLoaded?: (data: IMappedin) => void; }; currentPath?: MappedinNode[]; state: STATE; imageFlippingCache: {}; imageFlippingEnabled: boolean; MapView: MapView; type: string; container: HTMLDivElement; venue: IMappedin; colors: TCoreColors; loadOptions: TMapViewOptions['loadOptions']; smartCollisionEngine: SmartCollisionEngine; taskScheduler: TaskScheduler; renderer: Renderer; highlightedPolygons: Record; outlinedPolygons: Map; scene: Scene; focusZoomFactor: number; cameraObject: PerspectiveCamera; polygonMeshesById: Record; textLabelsByPolygonId: Record; labelOrientationDelay: number; isWebGL2: boolean; interactivePolygons: Record; polygonHoverColorsById: Record; mapManager: MapManager | undefined; sceneManager: SceneManager | undefined; mapObjects: Map; referenceMap: MappedinMap; currentInteractionEvent: INTERNAL_EVENT | undefined; resolution: Vector2; cameraParameters: any; cameraParametersZoomVector: Vector2; controls: typeof Mappedin.CameraControls; worldPlane: Mesh; canvasWidth: number; canvasHeight: number; cachedPadding: TPadding; currentScale: number; rendererDomElement: HTMLCanvasElement; resolutionScale: number; performanceController?: PerformanceController; outdoorGeometryLayers: string[]; billboardManager: BillboardManager; stackedMaps: StackedMapsController; tileManager: TileManager; setMapReason?: E_MAP_CHANGED_REASON; get aspect(): number; /** * Get all maps that are "visible" in the scene. */ get visibleMapsInCurrentScene(): MappedinMap[]; get visibleMapObjectsInCurrentScene(): MapObject[]; /** * Returns all currently visible layers */ get visibleLayersInCurrentScene(): {}; constructor(container: HTMLDivElement, venue: IMappedin, options: TMapViewOptions & { onDataLoaded?: (data: IMappedin) => void; onFirstMapLoaded?: (data: IMappedin) => void; }, MapView: MapView); get currentMap(): string | null; setState(state: STATE): Promise; getPolygon: (polygon: any) => MappedinPolygon; showEntireMap: (options: any) => any; resetPanBounds: () => void; focusOn: (options: any) => any; focusOnPolygon: (polygon: any, changeZoom: any, duration: any, curve: any) => any; focusOnPath: (path: any, polygons: any, changeZoom: any, duration: any, curve: any) => any; getCameraFrameForPoints: (pointCloud: any, horizontalFovFactor: any, verticalFovFactor: any, padding: any, ignoreZoom?: boolean, minZoom?: any, maxZoom?: any) => { position: any; zoom: any; }; setPadding: (padding?: TPadding) => void; getZoomLevelForPolygon: (polygon: any) => any; getZoomLevelForCurrentMap: () => any; getZoomLevelForObject: (object: any) => any; resetCamera: (forceOrigin?: boolean) => void; /** * Gets a position (to anchor a {{#crossLink "Marker"}}{{/crossLink}} usually) from a latitude and longitude. * * @method getPositionLatLon * @param latitude {Number} Latitude of position * @param longitude {Number} Longitude of position * @returns A position you can use with a Marker either initially or to update later when the user (for example) moves */ getPositionLatLon: (lat: number, lon: number, map?: string | MappedinMap | null) => Vector3; lockNorth: (element: any, offset?: number) => void; unlockNorth: (element: any) => void; convertTo3DMapPosition: (nodeOrCoordinate: MappedinNode | MappedinCoordinate) => Vector3; /** * Converts a 2D x,y screen position into a 3D MappedinCoordinate using projection */ convertScreenCoordinateToMapCoordinate: (x: number, y: number, map: MappedinMap) => MappedinCoordinate; convert3DMapPositionToCoordinate: (coord: any, mapClass?: MappedinMap | null | undefined) => MappedinCoordinate; getPositionPolygon: (polygon: any) => Vector3; getPositionNode: (node: any) => Vector3; hideAllLabels: () => void; setBackgroundColor: (color: any, alpha: any) => void; setSize: (width: any, height: any) => void; getMapScale: () => number; getNorth: () => number; /** * The scene only renders when something has changed. This should be something a 3rd party developer doesn't need to worry about, * but if you are doing something weird, or have your own special tween for something, you will want to call this function. * You can call it as often as you want, it just sets a flag that we need to render again, and renders a few frames if we weren't already doing that. * @method tryRendering * @param [renderMode=RENDER.ALL] {RENDER} Which parts of the scene to re-render */ tryRendering: (renderMode?: any) => void; /** * Display the performance characteristics and debug controls for this * MapView. * * @method showDebugUI */ showDebugUI: () => void; /** * Hide the performance characteristics and debug controls for this * MapView. * * @method hideDebugUI */ hideDebugUI: () => void; determineNewLabelSize: () => void; mapSetInProgress: Promise; mapSetResolved: any; setMap: (map: string | MappedinMap) => Promise; setMapWithReason: (map: string | MappedinMap, reason: E_MAP_CHANGED_REASON) => Promise; getPolygonsAtScreenCoordinate: (x: number, y: number, options?: TGetPolygonsAtCoordinateOptions) => MappedinPolygon[]; getPolygonsAtCoordinate: (coordinate: MappedinCoordinate, options?: TGetPolygonsAtCoordinateOptions) => MappedinPolygon[]; getNearestNodeByScreenCoordinate(x: number, y: number, mapOrMapId?: MappedinMap | MappedinMap['id']): MappedinNode; /** * Destroys instance and frees resources * * @method destroy */ destroy: () => void; } export default Core; } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.MVF.types' { import { MapId, ObstructionCollection, EntranceCollection, SpaceCollection, Style } from '@mappedin/mvf'; import { FeatureCollection, MultiPolygon, Point, Polygon } from 'geojson'; import { TImage, TMap, TNode, TOpeningHours, TPhone, TSiblingGroup, TSocial } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.API.types'; export type WithIDs = Map; type ManifestFile = { type: 'file'; name: string; }; type ManifestFolder = { type: 'folder'; name: string; children: ManifestFile[]; }; export type MVFStyle = Style & { type: string; width?: number; }; export type MVFObstructionFeature = ObstructionCollection['features'][number]; export type MVFEntranceFeature = EntranceCollection['features'][number]; export type MVFSpaceFeature = SpaceCollection['features'][number]; export type MVFv1PolygonLikeProperties = { id: string; altitude?: number; color?: string; externalId?: string | null; height?: number; opacity?: number; layer?: string; level: string; parent?: string | null; }; export type MVFv1SpaceProperties = MVFv1PolygonLikeProperties & { entrances: { level: TMap['id']; id: TNode['id']; }[]; }; export type MVFv1ObstructionProperties = MVFv1PolygonLikeProperties; export type MVFv1ConnectionProperties = { id: string; /** * Indicates that a connection is accessible */ accessible: boolean; /** * Array of node ids that this Connection connects with. */ destinations: string[]; level: string; multiplier: number; name: string; /** * Type of the connection such as `escalator` or `elevator` */ type: string; weight: number; }; export type MVFv1NodeProperties = { id: string; /** * Indicates that a node is accessible */ accessible: boolean; /** * External id of a node is used to sync and connect to external systems to Mappedin data */ externalId: string | null; level: string; multiplier: number; neighbors: string[]; weight: number; }; export type MVFv1LevelProperties = { id: string; abbreviation?: string; building?: string; elevation?: number; name: string; }; export type MVFv1ManifestProperties = { /** * Name of the venue */ name: string; folder_struct: (ManifestFolder | ManifestFile)[]; /** * Mappedin Venue Format version number of the MVF bundle */ version: string; /** * Timestamp when the MVF bundle was generated. E.g. `2022-02-25T16:26:09.908Z` */ time: string; }; export type MVFv1BuildingProperties = { id: string; name: string; venue: string; }; export type MVFv1CategoryProperties = { id: string; name: string; picture?: TImage; }; export type MVFv1LocationProperties = { id: string; address?: string | null; /** * Array of {@link MICategoryProperties | category} ids */ categories: string[]; /** * A text description of the location usually indicating what the location is used for */ description?: string | null; /** * Email address to for contacting this location */ email?: string | null; /** * External id used to connect Mappedin Location to an external system */ externalId?: string | null; /** * Opening hours of the location */ hours?: TOpeningHours[] | null; /** * Collection of links related to this location */ links?: { label: string; url: string; }[] | null; logo?: TImage | null; /** * Name of the location. By default this is the string displayed in the location label */ name: string; /** * Phone number for contacting this location */ phone?: TPhone | null; picture?: TImage | null; services?: string | null; siblingGroups?: TSiblingGroup[] | null; /** * Social media links of the location */ social?: TSocial | null; /** * Array of {@link MISpaceProperties | MVF Space} ids for this location */ spaces?: { id: string; map: string; }[] | null; states?: { type: string; start?: string; end?: string; }[] | null; type: string; }; export type MVFv1ObstructionCollection = FeatureCollection; export type MVFv1SpaceCollection = FeatureCollection; export type MVFv1ConnectionCollection = FeatureCollection; export type MVFv1NodeCollection = FeatureCollection; export type MVFv1LevelCollection = FeatureCollection; export type MVFv1ManifestCollection = FeatureCollection; export type MVFv1BuildingCollection = FeatureCollection; export type MVFv1CategoryCollection = FeatureCollection; export type MVFv1LocationCollection = FeatureCollection; export type ParsedMVFv1 = { /** * @propertyNames { "pattern": "^m_[0-9a-z]{16}$" } */ space: { [mapId: MapId]: MVFv1SpaceCollection | undefined; }; /** * @propertyNames { "pattern": "^m_[0-9a-z]{16}$" } */ obstruction: { [mapId: MapId]: MVFv1ObstructionCollection | undefined; }; /** * @propertyNames { "pattern": "^m_[0-9a-z]{16}$" } */ level: { [mapId: MapId]: MVFv1LevelCollection | undefined; }; /** * @propertyNames { "pattern": "^m_[0-9a-z]{16}$" } */ node: { [mapId: MapId]: MVFv1NodeCollection | undefined; }; /** * @propertyNames { "pattern": "^m_[0-9a-z]{16}$" } */ connection: { [mapId: MapId]: MVFv1ConnectionCollection | undefined; }; 'manifest.geojson': MVFv1ManifestCollection; 'building.geojson': MVFv1BuildingCollection; 'category.geojson': MVFv1CategoryCollection; 'location.geojson': MVFv1LocationCollection; }; export type RawMVFv1 = { 'manifest.geojson': Uint8Array; 'building.geojson': Uint8Array; 'category.geojson': Uint8Array; 'location.geojson': Uint8Array; level: Partial>; node: Partial>; space: Partial>; obstruction: Partial>; connection: Partial>; }; export {}; } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/pub-sub.typed' { /** * Generic PubSub class implementing the Publish-Subscribe pattern for event handling. * * @template EVENT_PAYLOAD - The type of the event payload. * @template EVENT - The type of the event. */ export class PubSub { /** * @private * @internal */ _subscribers: any; /** * @private * @internal */ publish(eventName: EVENT_NAME, data?: EVENT_PAYLOAD[EVENT_NAME]): void; /** * Subscribe a function to an event. * * @param eventName An event name which, when fired, will call the provided * function. * @param fn A callback that gets called when the corresponding event is fired. The * callback will get passed an argument with a type that's one of event payloads. * @example * // Subscribe to the 'click' event * const handler = (event) => { * const { coordinate } = event; * const { latitude, longitude } = coordinate; * console.log(`Map was clicked at ${latitude}, ${longitude}`); * }; * map.on('click', handler); */ on(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME] extends { data: null; } ? EVENT_PAYLOAD[EVENT_NAME]['data'] : EVENT_PAYLOAD[EVENT_NAME]) => void): void; /** * Unsubscribe a function previously subscribed with {@link on} * * @param eventName An event name to which the provided function was previously * subscribed. * @param fn A function that was previously passed to {@link on}. The function must * have the same reference as the function that was subscribed. * @example * // Unsubscribe from the 'click' event * const handler = (event) => { * console.log('Map was clicked', event); * }; * map.off('click', handler); */ off(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME]) => void): void; /** * @private * @internal */ destroy(): void; } } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinNavigatable' { import type { MappedinNode, MappedinPolygon, MappedinLocation } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; import { MappedinDirections, MappedinDestinationSet, Mappedin } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; import { TSimplifyDirectionsOptions } from '@mappedin/react-native-sdk/sdks/packages/navigator'; export type TDirectionToOptions = { /** * If true directions will only take accessible routes * @default false */ accessible?: boolean; /** * Include all the vortexes matching the given IDs */ includedVortexIds?: string[]; /** * Exclude all the vortexes matching the given IDs */ excludedVortexIds?: string[]; /** * Exclude all the nodes matching the given IDs */ excludedNodeIds?: string[]; /** * @experimental * Apply line-of-sight simplifying to directions. This will attempt to remove unnecessary nodes between turns. */ simplify?: TSimplifyDirectionsOptions; }; export abstract class MappedinNavigatable { #private; constructor(mappedin: Mappedin); /** * * Get Directions to a node, polygon, or location */ directionsTo(destination: MappedinNode | MappedinLocation | MappedinPolygon, options?: TDirectionToOptions): MappedinDirections; directionsTo(destination: MappedinDestinationSet, options?: TDirectionToOptions): MappedinDirections[]; /** * * Calculate walking distance in meters between 2 nodes, polygons or locations */ distanceTo(destination: MappedinNode | MappedinLocation | MappedinPolygon, options?: TDirectionToOptions): number; } } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinNode' { import type { MappedinPolygon, MappedinLocation, Mappedin, MappedinDirections, MappedinMap, TDirectionToOptions } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; import type { TOpeningHours } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.API.types'; import { MappedinNavigatable, MappedinDestinationSet } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; /** * A {@link MappedinNode} represents a position, anchored to a specific {@link MappedinMap}. * * A Node can have more properties but usually the default is sufficient. The {@link Mappedin} 'things' object is where you would specify what properties you want to download for Nodes. Only specify what you will actually use, to minmimze transfer time. Work with your Mappedin developer relations contact to set up any custom properties you need. * * @class MappedinNode */ export class MappedinNode extends MappedinNavigatable { #private; static readonly __type = "MappedinNode"; readonly __type = "MappedinNode"; static is(instance: object): instance is MappedinNode; /** * Node ID. * @property id {string} */ id: string; /** * X coordinate of Node's position. * @property x {number} */ x: number; /** * Y coordinate of Node's position. * @property y {number} */ y: number; /** * Operation Hours of this node. A Location may have different operation hours per node, for example 2 washrooms */ operationHours?: TOpeningHours[]; externalId?: string; constructor(mappedin: Mappedin, data: any); /** * Map Object that this Node is located on. * * @property map {MappedinMap} */ get map(): MappedinMap; /** * Latitude of node. This is expensive, especially if doing it for many/all nodes */ get lat(): number; /** * Longitude of node. This is expensive, especially if doing it for many/all nodes */ get lon(): number; /** * Adjacent Nodes. * * @property paths * @type [MappedinNode] */ get paths(): MappedinNode[]; set paths(paths: MappedinNode[]); /** * Locations attached to this Node. * * @property locations * @type [MappedinLocation] */ get locations(): MappedinLocation[]; /** * Polygon that this node is part of */ get polygon(): MappedinPolygon; static hydrate(nodes: any, mappedin: Mappedin): MappedinNode[]; static fetch(mappedin: Mappedin): Promise; /** * * Get Directions to a node, polygon, or location */ directionsTo(destination: MappedinNode | MappedinLocation | MappedinPolygon, options?: TDirectionToOptions): MappedinDirections; directionsTo(destination: MappedinDestinationSet, options?: TDirectionToOptions): MappedinDirections[]; /** * * Calculate walking distance in meters between 2 nodes, polygons or locations */ distanceTo(destination: MappedinNode | MappedinLocation | MappedinPolygon, options?: TDirectionToOptions): number; toJSON(): any; } } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinPolygon' { import type { MappedinNode, MappedinLocation, Mappedin, MappedinCoordinate } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; import { MappedinNavigatable, MappedinDirections, MappedinDestinationSet, MappedinMap, TDirectionToOptions } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; /** * The {@link MappedinPolygon} class represents the 3D shape of a {@link MappedinLocation} on a {{@link MappedinMap}. Polygons have access to Locations they belong to, and any entrances to the Polygon. * * A Polygon can have more properties but usually the default is sufficient. The {@link Mappedin}'things' object is where you would specify what properties you want to download for Polygons. Only specify what you will actually use, to minmimze transfer time. Work with your Mappedin developer relations contact to set up any custom properties you need. * * @class MappedinPolygon */ export class MappedinPolygon extends MappedinNavigatable { #private; static readonly __type = "MappedinPolygon"; readonly __type = "MappedinPolygon"; static is(instance: object): instance is MappedinPolygon; geometry: any; perspectives?: any; image?: { visible: boolean; url: string | Blob; original: string | Blob; useLocalScaling: boolean; viewBox: { width: number; height: number; }; scale: { x: number; y: number; }; fitToBounds: boolean; position: { x: number; y: number; z: number; }; rotation: { x: number; y: number; z: number; }; _isAbsolutelyPositioned?: boolean; }; holes?: unknown[]; textures?: { image: any; name: 'front' | 'side'; useFrontFaceImage?: boolean; }[]; material: { color: string; opacity?: number; }; label?: { visible: boolean; text: string; align: string; position: { x: number; y: number; z: number; }; rotation: { x: number; y: number; z: number; }; fontFamily: string; fontSize: number; color: string; }; /** * Node ID. * * @property id {string} */ id: string; layer?: string; layerId?: string; name?: string; externalId?: string; vertexes?: { x: number; y: number; }[]; /** * @internal * * The center coordinate of the polygon used for positioning {@link FloatingLabels} for MVF venues. */ center?: { x: number; y: number; }; canvasBounds?: { align: string; maxHeight: number; maxWidth: number; rotation: number; x: number; y: number; }; /** Category grouped ranking determined by the {@link MappedinCategory.sortOrder} and {@link rank} for this polygon. */ categoryRank?: number; constructor(mappedin: Mappedin, data: any); /** * Map Object that this Polygon is located on. * * @property map {MappedinMap} */ get map(): MappedinMap; /** * Locations attached to the Polygon. * * @property locations {[MappedinLocation]} */ get locations(): MappedinLocation[]; /** * Polygon's entrance Nodes. * * @property entrances {[MappedinNode]} */ get entrances(): MappedinNode[]; set entrances(entrances: MappedinNode[]); /** * Ranking for this polygon. */ get rank(): { score: number; node: string; } | null; static hydrate(polygons: any, mappedin: Mappedin): MappedinPolygon[]; static fetch(mappedin: Mappedin): Promise; /** * * Get Directions to a node, polygon, or location */ directionsTo(destination: MappedinNode | MappedinLocation | MappedinPolygon, options?: TDirectionToOptions): MappedinDirections; directionsTo(destination: MappedinDestinationSet, options?: TDirectionToOptions): MappedinDirections[]; /** * * Calculate walking distance in meters between 2 nodes, polygons or locations */ distanceTo(destination: MappedinNode | MappedinLocation | MappedinPolygon, options?: TDirectionToOptions): number; /** * Determines if a coordinate is within the polygon. */ containsCoordinate(coordinate: MappedinCoordinate): boolean; toJSON(): any; } } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinCategory' { /** * Collection of all Categories within the Venue. * * @property categories * @type [MappedinCategory] */ import type { MappedinLocation, Mappedin } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; import type { TPicture } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.API.types'; /** * A {@link MappedinCategory} is a collection of similar Locations. * * A Category can have more properties such as 'name', or 'parents' (for hierarchical categories) as well. * For example, you may have a Fashion category, which has a Men's Fashion and Women's Fashion category. A Men's clothing store would belong to the Men’s Fashion category, but not necessarily be present in the Fashion category's list of Locations. * * The {@link Mappedin} 'things' object is where you would specify what properties you want to download for Categories. Only specify what you will actually use, to minmimze transfer time. Work with your Mappedin developer relations contact to set up any custom properties you need. * * See below for an example a 'things' object with available Category properties specified: * * things: { * venue: [], * locations: [], * categories: ['venue', 'name', 'language', 'externalId', 'parents'], * maps: [] * } * * @class MappedinCategory */ export class MappedinCategory { #private; static readonly __type = "MappedinCategory"; readonly __type = "MappedinCategory"; static is(instance: object): instance is MappedinCategory; name?: string | undefined; externalId?: string | undefined; parents?: string[] | undefined; id?: string | undefined; icon?: TPicture | undefined; iconFromDefaultList?: string | undefined; /** Category sort priority. */ sortOrder?: number | undefined; constructor(mappedin: Mappedin, data: any); /** * Locations in this Category. * * @property locations * @type [MappedinLocation] */ get locations(): MappedinLocation[]; /** * Children of this Category. * * @property children * @type [MappedinCategory] */ get children(): MappedinCategory[]; static hydrate(categories: any, mappedin: Mappedin): MappedinCategory[]; static updateInPlace(mappedin: Mappedin, hydrateData?: any): Promise; static fetch(mappedin: Mappedin): Promise; toJSON(): any; } } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinDestinationSet' { import type { MappedinNode, MappedinPolygon, MappedinLocation } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; export class MappedinDestinationSet { destinations: (MappedinLocation | MappedinNode | MappedinPolygon)[]; constructor(destinations: (MappedinLocation | MappedinNode | MappedinPolygon)[]); } } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinVortex' { import type { Mappedin } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; /** * A {@link MappedinVortex} is a special entity that represents a link between two or more {@link MappedinMap}s at a given {@link MappedinVenue}. It is typically something like an elevator or stairs. These are also known as Connections in some parts of the system. * * They can be marked (wheelchair) Accessible or not for pathfinding purposes. If you ask for Accessible directions, paths that include non-accessible Vortexes like Stairs will not be used. * * @class MappedinVortex */ export class MappedinVortex { #private; static readonly __type = "MappedinVortex"; readonly __type = "MappedinVortex"; static is(instance: object): instance is MappedinVortex; /** * Vortex ID. * * @property id {string} */ id: string; accessible?: boolean; name?: string; type?: string; weight?: number; multiplier?: number; nodes?: string[]; filterFlags?: string[]; constructor(data: any); static hydrate(vortexes: any): MappedinVortex[]; static fetch(mappedin: Mappedin): Promise; toJSON(): any; } } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinVenue' { import type { Mappedin } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; import type { TLogo, TOpeningHours } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.API.types'; /** * A {@link MappedinVenue} is a specific place (like a mall) with one or more Maps (typically representing different floors) and Locations (stores, washrooms, elevators, etc). * * A Venue can have more properties such as 'name' and 'slug'. The {@link Mappedin} 'things' object is where you would specify what properties you want to download for Venues. Only specify what you will actually use, to minmimze transfer time. Work with your Mappedin developer relations contact to set up any custom properties you need. * * See below for an example a 'things' object with available Venue properties specified: * * things: { * venue: ['slug', 'name', 'language', 'address', 'city', 'state', 'postal', 'telephone', 'latitude', 'longitude', 'website', 'operationHours'], * locations: [], * categories: [], * maps: [] * } * * * @class MappedinVenue */ export class MappedinVenue { #private; defaultMap: string; address: string; city: string; countrycode: string; externalId: string; id: string; latitude?: number; logo?: TLogo; longitude?: number; name: string; operationHours?: TOpeningHours[]; postal: string; slug: string; state: string; telephone: string; tzid: string; tzidOverride: string; utcOffset: string; website: string; secureContentStorage: boolean; defaultLanguage: { code: string; name: string; }; languages: { name: string; code: string; }[]; topLocations?: string[]; /** * Venue render options provided by the server. */ renderOptions: { /** * Whether the venue should use perspectives to render the map or {@link Mappedin.polygons}. */ useLivePolygons: boolean; /** * Whether the venue should automatically apply {@link TDirectionToOptions} `simplify: { enabled: true }` to all directions. */ simplifyDirections: boolean; }; constructor(mappedin: Mappedin, data: any); get metadata(): any; set metadata(value: any); static hydrate(data: any, mappedin: Mappedin): MappedinVenue; static fetch(mappedin: Mappedin): Promise; get isMultiBuilding(): any; toJSON(): any; } } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinTheme' { import type { Mappedin } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; export class MappedinTheme { #private; /** * Theme ID. * * @property id {string} */ id: string; constructor(data: any); static hydrate(themes: any): MappedinTheme[]; static fetch(mappedin: Mappedin): Promise; toJSON(): any; } } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinRankings' { import type { Mappedin } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; import type { TPolygonRanking } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.API.types'; /** * A {@link MappedinRankings} object is something that contains all the rankings for all the {@link MappedinPolygon}s in the venue. It has a `polygons` array in which each item is linked to zero or more {@link MappedinPolygon}s. * * Rankings shows what the priority of displaying each polygon is. * * A specific polygon's ranking can have the properties `polygonId`, `entranceNodeId`, `score`. * * The {@link Mappedin} `things` object is where you would specify what type of ranking data you want to download for the venue. Only specify what you will actually use, to minimize transfer time. * * See below for an example a `things` object with the available ranking properties specified: * * things: { * venue: [], * locations: [], * categories: [], * maps: [], * rankings: ['polygons'], * } * * @class MappedinRankings */ export class MappedinRankings { #private; constructor(data: any); polygons: TPolygonRanking[]; static hydrate(rankings: any): MappedinRankings; static fetch(mappedin: Mappedin): Promise; toJSON(): any; } } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinLocationRankings' { import type { Mappedin } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; import type { TLocation } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.API.types'; /** One of these contains all the venue's rankings. * */ export class MappedinLocationRankings { #private; constructor(data: any); locations: TLocation[]; static hydrate(locationRankings: any): MappedinLocationRankings; static fetch(mappedin: Mappedin): Promise; toJSON(): any; } } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinEvent' { import type { TImage } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.API.types'; import type { MappedinLocation, Mappedin } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; /** * An event such as a promotion attached to a location in a venue for a period of time. Events can be created in the Mappedin CMS. * * @class MappedinEvent */ export class MappedinEvent { #private; /** * Unique id string of the event. */ id: string; type: string; /** * Event name */ name: string; /** * Optional, longer description of the event. */ description?: string | undefined; /** * Optional image to be used for displaying the event. */ image?: TImage | undefined; /** * Start timestamp of the event. Javascript date in milliseconds since 1 January 1970 UTC. */ startDate?: number | undefined; /** * Start timestamp of the event. Javascript date in milliseconds since 1 January 1970 UTC. */ endDate?: number | undefined; /** * Timestamp when the event should be displayed. Javascript date in milliseconds since 1 January 1970 UTC. */ showDate?: number | undefined; /** * @internal */ constructor(mappedin: Mappedin, data: any); /** * Location this event is occuring at. */ location(): MappedinLocation | undefined; /** * @internal */ static hydrate(events: any, mappedin: Mappedin): MappedinEvent[]; static updateInPlace(mappedin: Mappedin, hydrateData?: any): Promise; /** * @internal */ static fetch(mappedin: Mappedin): Promise; toJSON(): any; } } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinLocationState' { import type { Mappedin } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; /** * A location state, that can belong to any number of {@link MappedinLocation}s. * @class MappedinLocationState */ export class MappedinLocationState { #private; /** * @internal */ constructor(data: any); /** * @internal */ static hydrate(locationStates: any): MappedinLocationState[]; static updateInPlace(mappedin: Mappedin, hydrateData?: any): Promise; id: string; name: string; value: string; /** * @internal */ static fetch(mappedin: Mappedin): Promise; toJSON(): any; } } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinMap' { import type { MappedinMapGroup, Mappedin } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; import type { TGeoReference } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.API.types'; import { MappedinPolygon, MappedinLocation, MappedinCoordinate } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; /** * A {@link MappedinMap} belonging to a specific {@link MappedinVenue}. Typically represents a certain floor. Give this to a {@link MapView} to display to the user. * * A Map can have more properties such as 'elevation', 'name' (e.g. Level 1), and 'shortName' (e.g. L1). The elevation property can be used to determine the order of the floors (first, second, etc). Elevation is 0 based, going up and down in integers representing the number of floors above or below 0, which is ground level. * * The {@link Mappedin} 'things' object is where you would specify what properties you want to download for Maps. Only specify what you will actually use, to minmimze transfer time. Work with your Mappedin developer relations contact to set up any custom properties you need. * * See below for an example a 'things' object with available Map properties specified: * * things: { * venue: [], * locations: [], * categories: [], * maps: ['name', 'elevation', 'shortName'] * } * * @class MappedinMap */ export class MappedinMap { #private; static readonly __type = "MappedinMap"; readonly __type = "MappedinMap"; static is(instance: object): instance is MappedinMap; id: string; group: string; name: string; shortName: string; elevation: number; subtitle?: string; scale?: number; layers: { visible: boolean; name: string; id: string; }[]; x_scale?: number; perspectiveId?: string; scene: any; width: number; height: number; georeference: TGeoReference[]; constructor(mappedin: Mappedin, data: any); _scale: number; /** * Polygons on this Map. * * @property polygons {[MappedinPolygon]} */ get polygons(): MappedinPolygon[] | undefined; /** * Locations on this map */ get locations(): MappedinLocation[]; get nodes(): import("./MappedinNode").MappedinNode[]; /** * Map Group this map belongs to. * * @property mapGroup {MappedinMapGroup} */ get mapGroup(): MappedinMapGroup | null; /** * Create coordinate using mappedin units * @internal * * @param x x of coordinate * @param y y of coordinate */ createCoordinateByXY(x: number, y: number): MappedinCoordinate; /** * Create coordinate using lat/lon * * @param lat latitude of coordinate * @param lon longitude of coordinate */ createCoordinate(lat: number, lon: number): MappedinCoordinate; /** * * @returns map rotation in radians from north */ getNorth(): any; static hydrate(maps: any, mappedin: Mappedin): MappedinMap[]; static updateInPlace(mappedin: Mappedin, hydrateData?: any): Promise; static fetch(mappedin: Mappedin): Promise; get center(): MappedinCoordinate; toJSON(): any; } } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/MappedinMapGroup' { import type { MappedinMap, Mappedin } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; /** * A {@link MappedinMapGroup} is a collection of maps, usually representing the different floors of a single building. All Maps will be in a MapGroup, but if your Venue is only a single building (like a mall) you can likely ignore MapGroups entirely. * * @class MappedinMapGroup */ export class MappedinMapGroup { #private; static readonly __type = "MappedinMapGroup"; readonly __type = "MappedinMapGroup"; static is(instance: object): instance is MappedinMapGroup; id: string; name: string; constructor(mappedin: Mappedin, data: any); /** * Maps within this MapGroup. * * @property maps {[MappedinMap]} */ get maps(): MappedinMap[]; static hydrate(mapGroups: any, mappedin: Mappedin): MappedinMapGroup[]; static updateInPlace(mappedin: Mappedin, hydrateData?: any): Promise; static fetch(mappedin: Mappedin): Promise; toJSON(): any; } } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/utils' { import type { MergedThings, TGetVenueOptions, TGetVenueOptionsInternal, ThingsOption } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.types'; import type { MappedinMap } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; import { Mappedin, MappedinNavigatable, MappedinNode, MappedinPolygon, MappedinLocation, MappedinCoordinate } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; export function isGatewayKey(key: string): boolean; export function stringifyQuery(query: any, gateway?: boolean): string; export function buildUrl(options: TGetVenueOptionsInternal, pathname: string, query: any, supplementary?: boolean): string; /** * Make a network request to the Mappedin API to fetch an array of objects. * @param options options from getVenue- baseUrl and supplementaryUrl are used * @param pathname the type of data to request (like polygons or nodes) * @param query extra parameters to pass in the request * @param supplementary whether to use the supplementaryUrl when sending the request * @returns the result json */ export function getArray(options: TGetVenueOptionsInternal, pathname: string, query: any, supplementary?: boolean): Promise; /** * Make a network request to the Mappedin API to fetch an object. * @param options options from getVenue- baseUrl and supplementaryUrl are used * @param pathname the type of data to request (like polygons or nodes) * @param query extra parameters to pass in the request * @param supplementary whether to use the supplementaryUrl when sending the request * @param isExpectingArray whether the endpoint returns an array * @returns the result json */ export function getObject(options: TGetVenueOptionsInternal, pathname: string, query: any, supplementary?: boolean, isExpectingArray?: boolean): Promise; /** * Prepares the request and URL fields to pass into generateAPIRequest * @param options options from getVenue- baseUrl and supplementaryUrl are used * @param url string describing the url corresponding to the client's request * @param supplementary whether to use the supplementaryUrl when sending the request */ export function constructParamsForRequest(options: TGetVenueOptionsInternal, url: string, supplementary?: boolean): { req: { method: string; headers: any; }; url: string; }; export function generateAPIRequest(options: TGetVenueOptionsInternal, url: string, supplementary?: boolean): Promise; export function addToSet(array: any, value: any): void; export function getDistanceBetweenLatLon([lat1, lon1]: [number, number], [lat2, lon2]: [number, number]): any; export function getMapScale(map: MappedinMap): any; export function getNodesForNavigatable(obj: MappedinNavigatable): string[]; export function populateBundledImagesAsBlobs(data: any): Promise; export function getNearestNode(nodes: MappedinNode[], nodeOrCoordinate: MappedinNode | MappedinCoordinate): MappedinNode; export function debounce(func: any, wait: any, immediate?: any): (...args: any[]) => void; /** * Normalize the sortOrder value between 1 and 2, excluding 1 and 2. * Smaller sortOrder numbers result in higher priority (closer to 2) while higher numbers result in lower (closer to 1). * Provide an additional polygonRank for more granular ranking. * @param sortOrder the value of the category's sortOrder * @param min minimum sortOrder * @param max maximum sortOrder * @param polygonRank optional polygonRank between 0 and 1 * @returns the normalized value */ export function normalizeCategoryRank(sortOrder: number, min: number, max: number, polygonRank?: number): number; export function getDeviceIDFromStorage(): string; export function getSessionIDFromStorage(): string; /** * Finds the main Location associated with a Polygon. This means a Location * attached to the Polygon that has no parents, or, if there are none of those, * a Location nearest the top of some hierarchy that does have the Polygon attached. * * This means if there are multiple hierarchies of Locations attached to the Polygon, * the one that gets returned is not guaranteed to be what you want. * * @method getPrimaryLocationForPolygon * @param polygon {MappedinPolygon} The Polygon you want the primary Location of. * @return {MappedinLocation} */ export const getPrimaryLocationForPolygon: (polygon: MappedinPolygon | string | undefined, venue: Mappedin) => MappedinLocation | null; export function mergeThings(thingsOption: ThingsOption | undefined): MergedThings; } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.cache' { import { MappedinNode, MappedinPolygon, MappedinLocation, MappedinCategory, MappedinVortex, MappedinRankings, MappedinEvent, MappedinLocationState, MappedinMap, MappedinCoordinate, MappedinMapGroup, Mappedin } from '@mappedin/react-native-sdk/sdks/packages/get-venue/internal'; class MappedinCache { #private; constructor(mappedin: Mappedin); /** * Caches for getCollectionById function in `Mappedin.ts` * `!` is fine here, we're telling typescript that these * fields will be initialized at a later time (aka lazy) */ categories: { [id: string]: MappedinCategory; }; categoriesByExternalId: { [externalId: string]: MappedinCategory; }; locations: { [id: string]: MappedinLocation; }; locationsByExternalId: { [externalId: string]: MappedinLocation; }; vortexes: { [id: string]: MappedinVortex; }; vortexesByExternalId: { [externalId: string]: MappedinVortex; }; maps: { [id: string]: MappedinMap; }; mapsByExternalId: { [externalId: string]: MappedinMap; }; nodes: { [id: string]: MappedinNode; }; nodesByExternalId: { [externalId: string]: MappedinNode; }; polygons: { [id: string]: MappedinPolygon; }; polygonsByExternalId: { [externalId: string]: MappedinPolygon; }; events: { [id: string]: MappedinEvent; }; eventsByExternalId: { [externalId: string]: MappedinEvent; }; mapGroups: { [id: string]: MappedinMapGroup; }; mapGroupsByExternalId: { [externalId: string]: MappedinMapGroup; }; locationStates: { [id: string]: MappedinLocationState; }; rankings: { [id: string]: MappedinRankings; }; languages: { [id: string]: string; }; get polygonsByMapId(): Map; get nodesByMapId(): Map; findNearestNodeOnMap(mapId: string, coordinate: MappedinCoordinate): MappedinNode; findNodeWithinRadiusOnMap(mapId: string, coordinate: MappedinCoordinate, radius: number): MappedinNode[]; get locationsByMapId(): Map; static instances: WeakMap; static create(mappedin: Mappedin): MappedinCache; static clearInstance(mappedin: Mappedin): void; } export default MappedinCache; } declare module '@mappedin/react-native-sdk/sdks/packages/navigator/Edge' { import INode from '@mappedin/react-native-sdk/sdks/packages/navigator/interfaces/INode'; import IVortex from '@mappedin/react-native-sdk/sdks/packages/navigator/interfaces/IVortex'; class Edge { origin: INode; destination: INode; vortex?: IVortex; distance: number; angle: number; weight: number; constructor({ origin, destination, vortex, elevationDelta, distance, angle, pathWeight, }: { origin: INode; destination: INode; vortex?: IVortex; elevationDelta?: number; distance?: number; angle?: number; pathWeight?: number; }); } export default Edge; } declare module '@mappedin/react-native-sdk/sdks/packages/navigator/interfaces/IMap' { interface IGeoReference { target: { x: number; y: number; }; control: { x: number; y: number; }; } interface IMap { id: string; name: string; shortName: string; elevation?: number; scale?: number; x_scale?: number; georeference?: IGeoReference[]; [propName: string]: any; } export default IMap; } declare module '@mappedin/react-native-sdk/sdks/packages/navigator/interfaces/INode' { interface INode { id: string; x: number; y: number; map: string; externalId?: string; [propName: string]: any; } export default INode; } declare module '@mappedin/react-native-sdk/sdks/packages/navigator/interfaces/IVortex' { interface IVortex { id: string; name: string; type: string; weight: number; multiplier: number; [propName: string]: any; } export default IVortex; } declare module '@mappedin/react-native-sdk/sdks/packages/navigator/Navigator.utils' { export type TCoordinate = { x: number; y: number; }; /** * Modified line intercept math by Paul Bourke http://paulbourke.net/geometry/pointlineplane/ * Determines the intersection point of two line segments. * Return null if the lines don't intersect. */ export function getLineIntersection(line1Point1: TCoordinate, line1Point2: TCoordinate, line2Point1: TCoordinate, line2Point2: TCoordinate): { x: number; y: number; }; /** * Offsets a line between two nodes by a certain distance. */ export function getOffsetLine(point1: TCoordinate, point2: TCoordinate, offset: number): { x: number; y: number; }[]; /** * Determines if there is a line of sight between two nodes. */ export function hasLineOfSight(origin: TCoordinate, destination: TCoordinate, edges?: TCoordinate[][], bufferRadius?: number): boolean; } declare module '@mappedin/react-native-sdk/sdks/packages/navigator/interfaces/ILocation' { interface ILocation { id: string; name: string; [propName: string]: any; } export default ILocation; } declare module '@mappedin/react-native-sdk/sdks/packages/navigator/interfaces/IPolygon' { interface IPolygon { id: string; map: string; layer?: string; layerId?: string; externalId?: string; name?: string; vertexes: { x: number; y: number; }[]; } export default IPolygon; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/json-scene-loader' { import { Group } from 'three'; import { Element } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import DefaultAssetManager from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.AssetManager'; import { MappedinMap, MappedinPolygon } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { type MAP_RENDER_MODE } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; class JSONSceneLoader { defaultExtrudeSettings: { amount: number; bevelEnabled: boolean; }; materials: {}; scale: number; assetManager: DefaultAssetManager; setAssetManager(am: T): void; overlayHeight: number; /** Takes in either an object containing polygons and generates a 3D scene based on it, or a string URL to fetch those polygons from. **/ load(polygons: string | MappedinPolygon[], mapClass: MappedinMap, mapLoadingStrategy?: MAP_RENDER_MODE, allLayersVisible?: boolean): Promise<{ container: Group; elements: Element[]; visibleLayers: Set; }>; _build(polygons: MappedinPolygon[], mapClass: MappedinMap, mapLoadingStrategy?: MAP_RENDER_MODE, /** * If true, sets all layers to be visible. If false, uses the layer visibility from the mapClass. */ allLayersVisible?: boolean): Promise<{ container: Group; elements: Element[]; visibleLayers: Set; }>; } const _default: JSONSceneLoader; export default _default; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.RenderTasks' { /** * Tasks that can be submitted to the renderer. The `STATIC_AND_ANIMATED` task * is equivalent to a full re-render. */ enum RENDER { ANIMATED = "animated", ALWAYS_ON_TOP = "always_on_top", ALL = "all", TWEEN = "tween", COMPOSITE = "composite" } export default RENDER; } declare module '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.TaskScheduler' { /** * A function that can be submitted to the Task Scheduler to run each frame for * some provided number of frames. A single update can be repeatedly submitted; * if the number of frames left on the update is less than `frameCount`, it will * be reset to `frameCount`. * * @class FrameUpdate * @private */ export class FrameUpdate { /** * Create a new frame update that can be submitted to a scheduler. * @constructor * @param [options] {Object} Options for the update * @param [options.callback] {function} * The actual function to run every time this update is scheduled for * a frame. * @param [options.frameCount=1] {number} * How many frames this update should run for when it's submitted to * a scheduler * @param [options.ordering=0] {number} * An ordering value that's used to determine the order in which * frame updates will be run within a frame; larger numbers will * be run first * @param [options.supersededBy=[]] {[FrameUpdate]} * If this update is scheduled to run in a frame, but another update in * the provided list is also scheduled to run on that frame, then * this update will not be run. * @param [options.name=undefined] {string} * If provided, an arbitrary name for logging purposes. * @param [options.userdata] {Any} * Arbitrary data that you can store along with this update. */ constructor(options: { callback: (...args: any[]) => any; frameCount?: number; ordering?: number; supersededBy?: Set; name: string; userdata?: Record; }); _callback: (...args: any[]) => any; _frameCount: number; _ordering: number; _supersededBy: Set; name: string; _remainingFrameCount: number; _lastFrameTime: number; userdata?: Record; /** * Return the amount of time that this frame update took to execute during * its most recent execution, in milliseconds. If called during this frame * update, the value returned will be for the previous invocation. If called * before this frame update has been executed at least once, the returned * value is unspecified. * * @method lastFrameTime * @return {number} the previous frame time, in milliseconds */ getLastFrameTime(): number; } /** * A task that can be submitted to the Task Scheduler to be run every time * there is a frame update with spare time in the frame. * * @class FrameTask * @private */ export class FrameTask { /** * Create a new frame task that can be submitted to a scheduler. * @constructor * @param [options] {Object} Options for the task * @param [options.callback] {function} * The actual function to run when this task is scheduled. * @param [options.group=null] {FrameTaskGroup} * If provided, a group to which this task will be added when scheduled * @param [options.priority=0] {number} * Tasks with higher priority will be taken from the queue before tasks * with a lower priority. * @param [options.postponeOnAdd=false] {number} * If true, this task will not be run until `resumeTask` is called on the * scheduler. * @param [options.name=undefined] {string} * If provided, an arbitrary name for logging purposes. * @param [options.userdata] {Any} * Arbitrary data that you can store along with this task. */ constructor(options: { userdata?: Record; priority?: number; group?: FrameTaskGroup; postponeOnAdd?: number | boolean; name: string; lastFrameTime?: number; callback: (...args: any[]) => any; }); _postponed: number | boolean; userdata: Record; _priority: number; _group: FrameTaskGroup | null; name: string; _lastFrameTime: number; _callback: (...args: any[]) => any; _complete: boolean; _scheduled: boolean; _cancelled: boolean; /** * Return true if this task has been run at least once. * * @method isComplete * @return {boolean} */ isComplete(): boolean; /** * Return the amount of time that this frame task took to execute, * in milliseconds. If this task has not yet completed, the returned value * is unspecified. * * @method lastFrameTime * @return {number} the frame time, in milliseconds */ getLastFrameTime(): number; } /** * A group of tasks that must all be completed before the group is considered * complete. The tasks will be automatically garbage collected so that references * to the task don't linger. * * @class FrameTaskGroup * @private */ export class FrameTaskGroup { /** * Create a new frame task group. * * @constructor * @param [options] {Object} Options for the task group * @param [options.onComplete] {function} * A callback that will be triggered once every task in this group * has been completed. This callback may schedule a task, and the * scheduler will run that task in the same frame, if there is still * frame time for it. * @param [options.priority=0] {number} * The priority of all the tasks in this group. * @param [options.postponeOnAdd=false] {number} * If true, tasks from this task group will not be run until `resumeTask` * is called on the scheduler with this group. * @param [options.name=undefined] {string} * If provided, an arbitrary name for logging purposes. * @param [options.userdata] {Any} * Arbitrary data that you can store along with this task group. */ constructor(options: { onComplete?: (...args: any[]) => any; priority?: number; userdata: Record; postponeOnAdd: number | boolean; name: string; }); _postponed: number | boolean; _onComplete: (...args: any[]) => any; _priority: number; userdata: Record; name: string; _tasks: Set; _scheduledTasks: Set; _scheduled: boolean; _cancelled: boolean; /** * Return true if every task in this group has been run at least once. * @method isComplete * @return {boolean} */ isComplete(): boolean; /** * Return a list of tasks in this group. This will be a copy of the * underlying task group, so it's safe to mutate the group while * iterating over this array. * * @method tasks * @return {[FrameTask]} list of tasks in this group */ getTasks(): any[]; /** * Empty this task group. This will trivially satisfy `isComplete`. * * @method clear */ clear(): void; /** * Return one arbitrary incomplete task from this group, or undefined if * there are none. * * @method _popTask * @return {FrameTask} arbitrary scheduled task * @private */ _popTask(): any; } /** * A timer for the task scheduler that uses real wall-time to determine if there's * enough remaining time in a frame to execute another task. * * @class RealTimeTimer * @private */ export class RealTimeTimer { _maxMillisecondsPerFrame: number; _time: number; /** * @constructor * @param [options] {Object} Options for the timer * @param [options.maxMillisecondsPerFrame] * If the time since the beginning of the frame has been less than * or equal to this value, then another task may be executed */ constructor(options?: { maxMillisecondsPerFrame?: number; }); /** * Begin timing a frame. * * @method beginFrame */ beginFrame(): void; /** * If true, there is enough time remaining to execute another task. * * @method hasTimeRemaining * @return {boolean} */ hasTimeRemaining(): boolean; } /** * A timer that ticks every time `hasTimeRemaining` is called. * * @class FixedTimer * @private */ export class FixedTimer { _ticks: number; maxTasksPerFrame: number; /** * @constructor * @param [options] {Object} Options for the timer * @param [options.maxTasksPerFrame=5] * The number of tasks that will be exceuted in a single update call. * Can be modified as the `maxTasksPerFrame` property on this boject. */ constructor(options?: { maxTasksPerFrame?: number; }); /** * Begin timing a frame. * * @method beginFrame */ beginFrame(): void; /** * If true, there is enough time remaining to execute another task. * * @method hasTimeRemaining * @return {boolean} */ hasTimeRemaining(): boolean; } export type TaskSchedulerOptions = { timer?: RealTimeTimer; performance?: boolean; onUpdateEnd?: () => void; }; /** * A class that handles scheduling tasks to be performed within the time * constraints of frame updates, triggered using `requestAnimationFrame`. * * Tasks can either be scheduled once per frame (called "frame updates"), or * to execute as many times per frame as there is room for after processing * all frame updates (called "frame tasks"). * * Posted tasks will always run during the same frame, assuming there's time to * process them. However, an update or task that posts an update will not run * that update until the next frame. * * @class TaskScheduler * @private */ export class TaskScheduler { /** * Construct a new `TaskScheduler` with no tasks scheduled. * * @constructor * @param [options] {Object} Options for the scheduler * @param [options.timer=new RealTimeTimer()] * Timer that determines whether there is sufficient time left in a frame * to continue executing tasks * @param [options.performance=false] * If true, this task scheduler will annotate tasks and frame updates with * performance information. */ constructor(options?: TaskSchedulerOptions); _raf?: (callback: FrameRequestCallback) => number; options?: TaskSchedulerOptions; _timer: RealTimeTimer; _performance: boolean; _scheduledUpdatesByOrdering: Multimap; _scheduledTasksByPriority: Multimap; _postponedTasks: Set; _requestAnimationFrameHandle: number | null; _updatesToRunThisFrame: any[]; _lastFrameTime: number; _updatesRunLastFrame: Set; /** * Empty the task scheduler's queue. All tasks in it will be cancelled. * * @method clear */ clear(): void; /** * Destroy this task scheduler and remove all tasks from it. * * @method destroy */ destroy(): void; /** * Schedule this task scheduler to execute updates and tasks on the next * available animation frame. * * @method requestAnimationFrame */ requestAnimationFrame(): void; /** * Run all scheduled updates, and re-schedule another animation frame if any * scheduled updates still exist. If any scheduled update specifies * `shouldRunTasksAfterCompletion`, this will also run queued tasks until the * frame time runs out. * * @method update * @param timestamp {number} the current animation time, as returned from * `performance.now()`; will be automatically filled in by * `requestAnimationFrame` when it triggers this as a callback */ update(timestamp: number): void; /** * Execute all tasks that are currently pending, without regard for the * available frame time. * * @method flushTasks */ flushTasks(): void; /** * Return the amount of time elapsed during the last completed frame update, * in milliseconds. This value is unspecified if the task scheduler's * `update` method has not yet run or if the scheduler has been cleared. * If called during a frame update, this will * return the time elapsed during the previous frame update. * * @method lastFrameTime * @return {number} time elapsed during last frame update, in milliseconds */ getLastFrameTime(): number; /** * Return a set containing every update that was run during the previous * frame update. This will be empty if the task scheduler's `update` method * has not yet been run or if the scheduler has been cleared. */ getUpdatesRunLastFrame(): Set; _executeOneTask(timestamp: number): void; /** * Schedule an update to be run for the next `update.frameCount` frames. If * the update already exists in the scheduler, the update's frame count will * be refreshed to `update.frameCount`. This will also schedule an animation * frame to begin processing the update. * * @method scheduleUpdate * @param task {FrameUpdate} the update to schedule */ scheduleUpdate(update: FrameUpdate): void; /** * Schedule a task to be run during a frame update. This will also schedule * an animation frame to begin processing the task queue. * * @method scheduleTask * @param task {FrameTask} the task to schedule */ scheduleTask(task: FrameTask): void; /** * If the given update is in the queue, remove it. * * @method cancelUpdate * @param task {FrameUpdate} the update to cancel */ cancelUpdate(update: FrameUpdate): void; /** * If the given task or group is in the queue, remove it. Cancelling a * completed task is a no-op. * * Canceling an individual task will also remove it from its task group, if * it isn't already complete. * * @method cancelTask * @param task {FrameTask or FrameTaskGroup} the task to cancel */ cancelTask(task: FrameTask | FrameTaskGroup): void; /** * Set the provided task or group not to run, until it's resumed using `resumeTask`. * * Tasks that are in a group can't be postponed individually; instead, call * `postponeTask` with the entire group. * * @method postponeTask * @param task {FrameTask or FrameTaskGroup} the task to postpone */ postponeTask(task: FrameTask | FrameTaskGroup): void; /** * Allow a postponed task or task group to resume processing. This will also * request an animation frame to allow the resumed task to be processed. * * Tasks that are in a group can't be resumed individually; instead, call * `resumeTask` with the entire group. * * @method resumeTask * @param task {FrameTask or FrameTaskGroup} the task to resume */ resumeTask(task: FrameTask | FrameTaskGroup): void; /** * Change the priority of the given scheduled task or task group. * * @method setTaskPriority * @param task {FrameTask or FrameTaskGroup} the task whose priority will be changed * @param priority {number} the priority to assign the task */ setTaskPriority(task: FrameTask | FrameTaskGroup, priority: number): void; } /** * A map that maps a numeric key to a set of values. * * For use in the scheduler, we also maintain a sorted list of keys. * * @class Multimap * @private */ class Multimap { /** * @method constructor */ constructor(); _map: Map; _size: number; _sortedKeys: any[]; /** * Return true if the set for the given key contains the provided value. * * @method has * @param key {number} the key whose set to check * @param value {Any} the value to check */ has(key: number, value: any): any; /** * Return the list of elements at the given key. Make sure not to modify * it, as it will mess up the total element count. * * @method get * @param key {number} * @param value {Set(Any)} */ get(key: number): any; /** * @method insert * @param key {number} the key to which another value will be added * @param value {Any} the value to add to the key's set */ insert(key: number, value: any): void; /** * @method delete * @param key {number} the key at which the value is stored * @param value {Any} the value to delete */ delete(key: number, value: any): void; /** * Remove and return an arbitrary value from the set at the given key. * * @method pop * @param key {number} the key from which to remove a value * @return {Any} arbitrary value from the given key's set, or undefined if * the set at the given key is empty. */ pop(key: number): any; /** * Remove and return an arbitrary value from the set corresponding to * the key with the highest numeric value, using the javascript `<` * operator. * * @method popFromMaxKey * @return {Any} arbitrary value from the highest key's set, or undefined * if the map is empty */ popFromMaxKey(): any; /** * Return an iterator over every value in this multimap, at every key. * Mutating the multimap during iteration will result in undefined * behaviour. * * @method values * @return {Iterator} iterator over the values in the map */ values(): { [Symbol.iterator]: () => any; next: () => any; }; /** * A list of keys in this set, sorted by numeric value. Not cloned, * for efficiency's sake, so please don't mutate it. * * @method keys * @return {[number]} sorted list of numeric keys in the map */ keys(): any[]; /** * The number of elements in this multimap, equal to the sum of the sizes * of each key's set of values. * * @property size {number} number of elements in this multimap */ get size(): number; } export {}; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/scene-manager/MapView.SceneManager' { import { MappedinMap } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import type { ICore, TCameraAnimationOptions, TFocusOnCameraOptions, TCameraTargets, MapViewStackScene } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { MapObject, MapViewScene, type TStackedMapsOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; export type TSceneTransitionOptions = { /** * Map to set as active during the transition. This will decide where the camera will be positioned, as well as which * colliders are enabled. */ activeMap?: MappedinMap; verticalDistanceBetweenMaps?: TStackedMapsOptions['verticalDistanceBetweenMaps']; /** * Whether to auto focus on the active map or leave the camera where it is. * For single building venues, this should look the same way it did with MapManager * For multi-building venues, this means the camera will not pan over to where the active map * is relative to the world, which may look like broken behavior. * @default true */ autoFocusOnActiveMap?: boolean; /** * Where to focus the camera during transition to Scene. Will focus to fit the map if not provided. * Currently, will discard any targets that are not on the active map. */ focusOn?: { targets?: TCameraTargets; options?: TFocusOnCameraOptions & TCameraAnimationOptions; }; }; class SceneManager { core: ICore; currentScene: MapViewScene | MapViewStackScene; /** * MapObjects that have been loaded and positioned in the scene */ processedMapObjects: Set; constructor(core: ICore, startingScene: MapViewScene); get currentMap(): MappedinMap; renderGrid(): void; transitionTo(scene: MapViewScene, transitionOptions?: TSceneTransitionOptions): Promise; } export default SceneManager; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/scene-manager/MapView.DynamicFocusSceneManager' { import { MappedinMap, MappedinMapGroup } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import type { ICore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { MapViewScene, DynamicFocusScene } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; class DynamicFocusSceneManager { dynamicFocusScene: DynamicFocusScene; core: ICore; constructor(core: ICore, baseMap: MappedinMap); panBounds: any; mapShouldSetOnUserInteraction: boolean; get currentScene(): { resize: () => void; currentMap: MappedinMap; mapObjects: Map; }; get currentMap(): MappedinMap; setDefaultMapForMapGroup(mapGroup: MappedinMapGroup, map: MappedinMap): void; resetDefaultMapForMapGroup(mapGroup: MappedinMapGroup): void; determineTargetMap(): Promise; update(): void; transitionTo(scene?: MapViewScene): Promise; } export default DynamicFocusSceneManager; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.MapObject' { import { Box3, Mesh, MeshLambertMaterial, Object3D, Vector3, BufferGeometry } from 'three'; import { FrameTaskGroup } from '@mappedin/react-native-sdk/sdks/packages/get-venue/Mappedin.TaskScheduler'; import { Element, FlippableImage, MappedinMap, TaskScheduler, FlatLabel, SmartTooltip, ICore, InternalFloatingLabel, TCreateThreeDMarkerOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { PubSub } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/pub-sub'; /** * Some preset priorities for tasks. */ export const TASK_PRIORITY: { VISIBLE_MAP_HIGH: number; VISIBLE_MAP_LOW: number; VISIBLE_MAP_MARKER: number; ASYNC_MAP_HIGH: number; ASYNC_MAP_LOW: number; ASYNC_MAP_MARKER: number; MAP_LOADED: number; }; export const RENDER_ORDER: { MAP_ELEMENT: number; BUILDING_OUTLINE: number; MAP_HOVER: number; POLYGON_IMAGE: number; }; export function convertToShortHandInterpolation(interpolation: any[]): any; export const SCENE_FROM_LIVE_JSON = false; type InterpolationFunctionType = (zoomLevel: number) => any; export class LayerGroup { mergedObjectsGroup: any; hoverObjectsGroup: any; objectsByMaterials: Map; hoverableMeshChildren: Mesh[]; _isVisible: boolean; needsUpdate: boolean; userData: any; opacity: number; outlineDarkeningFactor: number; core: ICore; mapObject: MapObject; name: string; layers: string[]; interpolationFn: InterpolationFunctionType | null; opacityInterpolation?: { zoomLevel: number; opacity: number; }[] | { inputZoomLevel: number[]; outputOpacity: number[]; }; set isVisible(value: boolean); get isVisible(): boolean; constructor(mapObject: MapObject, name: string, layers: string[], visible: boolean); dispose(): void; setOpacity(opacity: any): void; setOutlineDarkeningFactor(factor: number): void; } export interface LoadOptions { async?: boolean; taskScheduler: TaskScheduler; mapRenderStrategy?: string; useLivePolygons?: boolean; } interface BoundingBox { min: Vector3; max: Vector3; } interface FadeOptions { onComplete?: () => void; duration: number; } class MapObject extends PubSub { _flippableImagedById: any; _started: boolean; _loaderPromise: Promise; _promiseResolve: (value?: void | PromiseLike | MapObject) => void; _showCount: number; _taskScheduler: TaskScheduler; _highPriorityTasks: FrameTaskGroup; _lowPriorityTasks: FrameTaskGroup; _markerTasks: FrameTaskGroup; _mapLoadedTasks: FrameTaskGroup; _visibilityLatch: boolean | null; _objLoadedComplete: boolean; _hoverableMeshChildren: Mesh[]; imageMeshesById: Record; visible: boolean; objectsDictionary: Record; north: number; mapScale: number | null; object: Object3D; labels: Set; tooltips: Set; markers: Set; box: Box3; textObjects: FlatLabel[]; labelBatchCreator: any; imagesToFlip: (typeof FlippableImage)[]; seenByCamera: boolean; threeJSMarkers: Map; core: ICore; mapClass: MappedinMap; polygonMeshesById: Record; loadMethod: string; loadAsync: boolean; id: string; mapRenderingStrategy: string; needsUpdate: boolean; layerGroups: Map; loadedLayerNames: string[]; loadedElements: Element[]; boundingBox: BoundingBox | undefined; elements: Element[]; loadMethodUsed: string; mapLoaded: any; useLivePolygons: boolean; constructor(mapClass: MappedinMap, polygonMeshesById: Record, showCount: number, core: ICore, loadOptions: LoadOptions); fade(layerGroupName: string | string[], { direction, onComplete, duration }: { direction?: string; onComplete?: () => void; duration?: number; }): { start: () => Promise; }; /** * Fade a layer group or number of layer groups in * @param {string|string[]} layerGroupNames * @returns */ fadeIn(layerGroupNames?: string | string[], options?: FadeOptions): { start: () => Promise; }; /** * Fade a layer group or number of layer groups out * @param {string|string[]} layerGroupNames * @returns */ fadeOut(layerGroupNames?: string | string[], options?: FadeOptions): { start: () => Promise; }; renderLayerGroup(include?: string[], exclude?: string[]): void; processLayers(allLayers: string[], include?: string[], exclude?: string[]): string[]; processLayerGroup(name?: string, include?: string[], exclude?: string[], visible?: boolean, elements?: Element[], defaultRenderOrder?: number): LayerGroup; get hoverableMeshChildren(): Mesh[]; _objLoadedMerged(object: any): Promise; _objLoaded(object: any): void; loadPolygonNow(polygonId: string): void; _addElementToScene(element: Element): void; /** * Load the map, if it's not already loaded. Returns the old promise if it's already done, so you can safely call it whenever needed. If needed, this could be modified to Returns a Promise that will be Done when the OBJ, MTL and textures have been downloaded, and the objectsDictionary has been generated. **/ load(): Promise; _dispose(objectToDispose: Object3D): void; destroy(): void; add(childObjectToAdd: Object3D): void; /** * Convert lat/lon to local map position vector */ getPositionLatLon(lat: number, lon: number): Vector3; /** * Previously, each map was centered around 0,0,0 and scaled to fit the map. * With scene manager, each map is positioned and scaled relative to the base map/world * Since most 3D objects (like blue dot) are added to the map via `getPositionLatLon`, they already * have the map's matrix applied, on top of being affected as a child of the map's own transform * This method inverts the map's matrix to resolve the double matrix application issue. * TODO: investigate a better way to handle this */ addToObject(child: Object3D): void; /** * Translates objects that are added to the map (such as blue dot), assuming they are added via `getPositionLatLon`, * or `convertTo3DMapPosition`, where the map's matrix has already been applied. */ translateChild(child: Object3D, position: Vector3): void; getMapScale(): number; getNorth(): number; enableImageFlipping(polygonId: string, rotation?: number): void; disableAllImageFlipping(): void; /** * Return true if this map has been loaded to the point where it can be * manipulated as a complete object. In synchronous mode, this requires all * loading tasks to be completed, but in async mode, only high-priority * tasks (adding polygons to the world) have to be completed. */ isReady(): boolean; /** * Return true if this map has been loaded to the point where the only tasks * remaining are marker tasks. */ isFullyLoaded(): boolean; /** * A function that should be called when the map is made visible, in order * to kick off its tasks. */ onVisible(): void; /** * A function that should be called when the map is made invisible, in order * to postpone its tasks. * @param persistImages - if true, image meshes will not be set visible = false */ onInvisible(persistImages?: boolean, persistPaths?: boolean): void; /** * Queue a task on this map that will be executed when the high and low * priority tasks have been processed. */ addPendingMarkerTask(marker: string, callback: (...args: any[]) => any): void; /** * Queue a task on this map that must be completed before the map will be * considered `isReady` in synchronous loading mode. */ addPendingLowPriorityTask(name: string, callback: (...args: any[]) => any): void; /** * Queue a task on this map that will be queued when the map is loaded, or * immediately if the map has already been loaded. */ addPendingMapLoadedTask(name: string, callback: (...args: any[]) => any): void; /** * Queue a task on this map that must be completed before the map will be * considered `isReady`, and will be evaluated before any low-priority * tasks. */ _addPendingHighPriorityTask(name: string, callback: (...args: any[]) => any): void; /** * Add a ThreeJS marker to this map object. This should be called through * the `MapView3D`. * * @method addThreeJSMarker * @param {Object} options * @param {Object3D} [options.object] the marker object to add to the scene * @param {Vector3} [options.position=null] if provided, sets the object's position on the map * @param {Euler} [options.rotation=null] if provided, sets the object's rotation relative to the map * @param {Vector3} [options.scale=null] if provided, sets the object's scale relative to the map * @return {ThreeJSMarkerHandle} a unique identifier for the marker */ addThreeJSMarker(options: TCreateThreeDMarkerOptions): ThreeJSMarkerHandle; /** * Remove the given `ThreeJSMarker` from this map. * * @method removeThreeJSMarker * @param {ThreeJSMarkerHandle} markerHandle the marker to remove * @return {boolean} true if the marker existed on the map and was removed; * false if the marker does not exist on the map */ removeThreeJSMarker(markerHandle: ThreeJSMarkerHandle): boolean; /** * Remove all `ThreeJSMarker` from this map. * * @method removeThreeJSMarker */ _removeThreeJSMarkers(): void; removeLabels(): void; /** * Called when a task group that may be required for map loading completes, * to see if all the relevant task groups have been completed. */ _checkIfLoaded(): void; /** * Called when the root ThreeJS object has been created, and child elements * may be added. */ _onRootObjectCreated(): void; _popinChildObjects(): void; } /** * A handle to a 3D marker added to a map. * * @class ThreeJSMarkerHandle */ export class ThreeJSMarkerHandle { _deleted: boolean; _mapId: string | null; _object: Object3D; constructor(args: { mapId: string; object: Object3D; }); /** * Return the ThreeJS object associated with this marker, so that it * can be moved around, scaled, etc. * * @property {Object3D} object */ get object(): Object3D; _destroy(): void; } export default MapObject; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.AssetManager' { import { Texture, TextureLoader } from 'three'; import type { MappedinMap } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; /** * @internal */ export default class DefaultAssetManager { textureLoader: TextureLoader; loadMapPolygons(map: MappedinMap): Promise; loadImage(url: string): Promise; } } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/bundle-asset-manager' { import type { Texture } from 'three'; import { Mappedin, MappedinMap } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import { AssetManager } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; /** * @internal */ export class BundleAssetManager extends AssetManager { venueData: Mappedin; constructor(venueData: Mappedin); loadMapPolygons(map: MappedinMap): Promise>; loadImage(url: string): Promise; } } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.SmartCollider' { import SmartCollisionEngine from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.SmartCollisionEngine'; import { Rectangle } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/quad-tree'; import { MappedinCoordinate, MappedinNode } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; export type TRange = [number, number, number, number]; type TCustomCollider = ICollider & T; export type TColliderStrategyProps = { x: number; y: number; totalHeight?: number; totalWidth?: number; }; export type TColliderStrategy = { name: string; getBoundingBox: (TColliderStrategyProps: any) => TRange; onStrategySelected: (collider: TCustomCollider) => void; }; export type TGetBoundingBox = ({ x, y }: { x: any; y: any; }) => [number, number, number, number]; export type TDimensions = { width: number; height: number; }; export enum EColliderAction { 'initial' = 0, 'show' = 1, 'hide' = 2 } export type TColliderPosition = { nodeOrCoordinate: MappedinNode | MappedinCoordinate; height?: number; }; export type TBoudingBox = [string, Rectangle, (collider: TCustomCollider) => void, TGetBoundingBox][]; export interface ICollider { dimensions: TDimensions; screenPosition: [number, number]; getBoundingBoxForCurrentStrategy?: TGetBoundingBox; options?: Record; mapId: string; visible: boolean; rank: number; id: string; layer: string; _bboxes?: TBoudingBox; offscreen?: boolean; setAction: (action: EColliderAction) => void; action?: EColliderAction; position: TColliderPosition | null; __engine?: SmartCollisionEngine; enable: () => void; disable: () => void; enabled: boolean; promote?: () => void; demote?: () => void; setPriority?: (rank: number) => void; resetPriority?: () => void; readonly strategies: TColliderStrategy[]; colliderDidMount?: () => void; colliderDidNotFindAHome?: () => void; colliderDidGoOffscreen?: () => void; colliderDidGoOutsideGrid?: () => void; colliderDidUpdateVisiblity?: () => void; colliderDidUpdatePosition?: (prop: [x: number, y: number]) => void; } class BaseCollider implements ICollider { __engine?: SmartCollisionEngine; _initialRank: number; screenPosition: [number, number]; enabled: boolean; options: any; mapId: string; id: string; action: EColliderAction; getBoundingBoxForCurrentStrategy: undefined | TGetBoundingBox; rank: number; visible: boolean; offscreen: boolean; position: TColliderPosition | null; dimensions: { width: number; height: number; }; layer: string; _bboxes: TBoudingBox; flipIfNeeded(): void; constructor(options: any); setPosition(position: MappedinNode | MappedinCoordinate, updateCollisionEngine?: boolean): void; setPriority(rank: any): void; setAction(action: any): void; resetPriority(): void; promote(): void; demote(): void; get strategies(): TColliderStrategy[]; removeSelf(): void; enable(): void; disable(): void; colliderDidUpdatePosition(pos: any): void; colliderDidNotFindAHome(): void; colliderDidMount(): void; colliderDidUpdateVisiblity(): void; } export default BaseCollider; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.HTMLCollider' { import BaseCollider, { ICollider } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.SmartCollider'; export type TRange = [number, number, number, number]; export type TDimensions = { width: number; height: number; }; export interface IHTMLCollider extends ICollider { containerEl: any; contentEl: any; } class HTMLCollider extends BaseCollider { #private; contentEl: null | HTMLDivElement; containerEl: null | HTMLDivElement; ready: boolean; removeSelf(): void; enable(): void; disable(): void; colliderDidGoOffscreen(): void; colliderDidNotFindAHome(): void; colliderDidUpdatePosition(pos: any): void; updateDimensions(): void; /** * @internal */ updateDimensionsImmediately(): void; colliderDidMount(): void; colliderDidUpdateVisiblity(): void; } export default HTMLCollider; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/MarkersController' { import { MappedinCoordinate, MappedinNode } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import type { ICore, TCreateMarkerOptions, TAnimationOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { InternalMarker } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import TWEEN from '@tweenjs/tween.js'; /** * A marker containing some HTML content. */ export class Marker { #private; /** * @internal */ constructor(internalMarker: InternalMarker); /** * A generated ID for this marker. */ get id(): string; /** * The container element for this marker. This element's position is automatically updated. */ get containerEl(): HTMLDivElement; /** * The content that was provided when creating this marker. */ get contentEl(): HTMLDivElement; /** * Force an update on the Marker. Call this if the contents of the Marker have changed since * it was created. Otherwise, the Marker may still collide as if it were the original size. */ update(): void; } class MarkersController { #private; markersMap: Map; animations: Map void; }>; constructor(core: ICore); /** * Creates a new internal marker */ create(nodeOrCoordinate: MappedinNode | MappedinCoordinate, contentHtml: string, options?: TCreateMarkerOptions): InternalMarker; /** * @internal * * Create an internal marker and add to collision engine. Typically used for internal purposes. Internal markers are not affected * by adding or removing using the public API. */ addInternal(nodeOrCoordinate: MappedinNode | MappedinCoordinate, contentHtml: string, options?: TCreateMarkerOptions): InternalMarker; /** * Create a new Marker, containing some HTML, at the specified position * @param nodeOrCoordinate the position for the Marker * @param contentHtml the content to show in the Marker * @param options options for the display of the Marker * @returns the Marker object that was created. */ add(nodeOrCoordinate: MappedinNode | MappedinCoordinate, contentHtml: string, options?: TCreateMarkerOptions): Marker; updateMap(internalMarker: InternalMarker, from: string, to: string): void; /** * Moves a Marker to a new position instantaneously. * @param markerOrMarkerId the Marker to move * @param target the new position for this Marker * @param updateCollisionEngine whether or not to update the collision engine after setting new position */ setPosition(markerOrMarkerId: InternalMarker | Marker | Marker['id'], target: MappedinNode | MappedinCoordinate, updateCollisionEngine?: boolean): void; /** * Moves a Marker to a new position over time. * @param markerOrMarkerId the Marker to move * @param target the new position for this Marker * @param options the options for how this movement should be animated */ animate(markerOrMarkerId: Marker | Marker['id'], target: MappedinCoordinate | MappedinNode, options?: TAnimationOptions): Promise; /** * Removes a Marker. * @param markerOrMarkerId the Marker to be removed */ remove(markerOrMarkerId: Marker | Marker['id']): void; /** * Remove all Markers from all maps. */ removeAll(): void; } export default MarkersController; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.Marker' { import './Mappedin.Marker.scss'; import { COLLISION_RANKING_TIERS, HTMLCollider, MARKER_ANCHOR } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import type { TColliderStrategy, IHTMLCollider, TColliderPosition } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; /** * @hidden * @internal */ export type TSmartMarkerOptions = { contentHtml?: string; position: TColliderPosition; mapId: string; id?: string; anchor?: MARKER_ANCHOR; collisionRank?: COLLISION_RANKING_TIERS; layer?: string; }; type TTooltipStyle = { top?: string; left?: string; }; /** * @hidden * @internal */ class InternalMarker extends HTMLCollider implements IHTMLCollider { _el: Element | null; style: TTooltipStyle; polygon: any; position: TColliderPosition; constructor(options: TSmartMarkerOptions); get strategies(): TColliderStrategy[]; colliderDidMount(): void; setAction(action: any): void; colliderDidNotFindAHome(): void; colliderDidUpdatePosition(pos: any): void; colliderDidGoOffscreen(): void; colliderDidUpdateVisiblity(): void; } export default InternalMarker; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/scene-manager/MapView.Scene' { import { Object3D } from 'three'; import { MappedinMap } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import type { ICore, SceneManager, TSceneTransitionOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { MapObject } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; class MapViewScene { #private; maps: MappedinMap[]; mapObjectsArray: MapObject[]; transitionOptions: TSceneTransitionOptions | undefined; object: Object3D; currentMap: MappedinMap; mapObjects: Map; constructor(maps: MappedinMap[], core: ICore); get mapObjectsByMapGroup(): { [x: string]: MapObject[]; }; /** * Determine each maps position and rotation relative to the refernce map */ determineMapPositionAndRotation(map: MappedinMap): { position: number[]; scale: number[]; rotation: number[]; }; /** * Convenience function to initialize scene (for stacked maps) */ prepare(sceneManager: SceneManager, transitionOptions?: TSceneTransitionOptions): Promise; /** * Override this method if works need to be done when the window is resized */ resize(): void; focusOnCurrentMap(transitionOptions?: TSceneTransitionOptions, isStartingScene?: boolean): Promise; preRender(transitionOptions?: TSceneTransitionOptions): Promise[]>; /** * Override this method when unmounting a scene */ unmount(): void; postRender(): void; } export default MapViewScene; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/scene-manager/MapView.StackScene' { import type { Object3D } from 'three'; import { Box3, Mesh } from 'three'; import type { MappedinMap } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import type { ICore, SceneManager, TSceneTransitionOptions, MapObject } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { MapViewScene } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; export const DEFAULT_VERTICAL_DISTANCE_BETWEEN_MAPS = 50; class MapViewStackScene extends MapViewScene { #private; containerBoxHelper: Box3; get cachedIdealVerticalDistance(): number; set cachedIdealVerticalDistance(value: number); viewportBox: any; currentMapWrapperMesh: any; currentMapWrapperBoxHelper: any; viewportMesh: any; stackContainerMesh: any; currentMinTilt: number; constructor(maps: MappedinMap[], core: ICore, mapLabels?: boolean); lockControls(): void; unlockControls(): void; createStackBoundingBox(): void; focusOnStackBox(transitionOptions?: TSceneTransitionOptions): Promise; unmount(): void; computeMapZ(mo: MapObject, index: number, verticalDistanceBetweenMaps?: number | 'auto'): number; prepare(sceneManager: SceneManager, transitionOptions?: TSceneTransitionOptions): Promise; postRender(): void; expandMaps: (mapObjects: MapObject[], transitionOptions: TSceneTransitionOptions) => { start: () => Promise; }; contractMaps: (currentMapObject?: MapObject) => { start: () => Promise; }; scrollToMap: (map: MappedinMap, duration?: number) => Promise; updateFrame: (val: any) => void; resize(): Promise; labels: Map; createMapLabels: () => void; updateLabels: () => void; destroyLabels: () => void; helpers: Object3D[]; debug2DBox: HTMLElement[]; /** * Get the first two floor distance as the ideal vertical distance * cached the result to avoid recomputation. * this is a temporary solution to provide an ideal stackedmap vertical distance between floors. * the problem with this approach: * 1. it only considers the first two floors * 2. if the camera panned higher then this computation will be wrong * 3. since cache is at module level, any cercumstances changes will not be reflected: camera rotation */ getIdealVerticalDistance(): number; focusOnCurrentMap(transitionOptions?: TSceneTransitionOptions): Promise; } export default MapViewStackScene; export function isValidBoxNumber(v: number): boolean; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.Element' { import { MeshLambertMaterial, Mesh, ExtrudeGeometry, Vector3, Texture, Group } from 'three'; import { PubSub } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/pub-sub'; import { AssetManager, MappedinMap, MappedinPolygon } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { MAP_RENDER_MODE } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; class Element extends PubSub { polygon: MappedinPolygon; mapClass: MappedinMap; container: Group; visible: boolean; mode: MAP_RENDER_MODE; static defaultMaterial: MeshLambertMaterial; static hoverMeshMaterial: MeshLambertMaterial; assetManager: AssetManager; imageVisible: boolean; labelVisible: boolean; polygonHeight: number; geometry: ExtrudeGeometry; mesh: Mesh; material: MeshLambertMaterial | MeshLambertMaterial[]; labelMesh?: Mesh; imageMesh?: Mesh; /** * For the time being we indicate inflated walls so they don't add to ray casting. Since these are walls it's a good optimization */ isInflated: boolean; sortScore: number | null; boundingBox?: { min: Vector3; max: Vector3; }; static materials: { [key in string]: MeshLambertMaterial | MeshLambertMaterial[]; }; static defaultExtrudeSettings: { depth: number; bevelEnabled: boolean; }; static scale: number; static overlayHeight: number; static getDefaultMaterial(): MeshLambertMaterial; static getWeightedCenter(vertices: any): any; static getBoundingCentre(vertices: any): { x: number; y: number; }; static _makeFromCoords(className: any, coords: any, mapClass: any, element: any): any; static _inflate(coords: any, width: any): any; static _setPolygonDefaults(poly: any): any; constructor(poly: MappedinPolygon, mapClass: MappedinMap, container: Group, assetManager: any, mapLoadingStrategy?: MAP_RENDER_MODE); getBoundingBox(): { min: Vector3; max: Vector3; }; load(): Promise; _addLabel(poly: MappedinPolygon, mapClass: MappedinMap): void; static imagesLoadingInProgress: Map>; _addImage(polygon: MappedinPolygon, mapClass: MappedinMap): void; static _normalizeColor(color: any): number; static _getMaterial(color: string, opacity: number, map: MappedinMap['id']): any; static _clip(vertices: any, offset: any): any; } export default Element; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/scene-manager/dynamic-focus-scene-manager/building' { import { Object3D } from 'three'; import { MappedinMap, MappedinMapGroup } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import type { ICore, MapObject, Mappedin } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { determineMapPositionAndRotation } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/scene-manager/dynamic-focus-scene-manager/dynamic-focus-utils'; import { LayerGroup } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.MapObject'; class Building { layerGroup: LayerGroup; mapGroup: MappedinMapGroup; defaultMap: MappedinMap; activeMap?: MappedinMap; visibleMap?: MappedinMap; readonly startingMap: MappedinMap; baseMap: MappedinMap; venue: Mappedin; object: Object3D; mapObjects: MapObject[]; constructor(core: ICore, mapGroup: MappedinMapGroup, layerGroup: LayerGroup, startingMap: MappedinMap, baseMap: MappedinMap, venue: Mappedin); loading: boolean; activeMapOpacity: number; buildingOpacity: number; animating: boolean; /** * Set the opacity of the currently active map in the building */ setActiveMapOpacity(opacity: number, duration?: number): void; tweenActiveMapOpacity(targetOpacity: number, duration?: number): void; /** * Set the opacity of the building outline */ setBuildingOutlineOpacity(opacity: number): void; get activeMapObject(): MapObject; get visibleMapObject(): MapObject; get defaultMapObject(): MapObject; get baseMapObject(): MapObject; state: string; determineMapPositionAndRotation: typeof determineMapPositionAndRotation; /** * The building is in view, so we should have the correct map loaded and ready to be displayed */ onInView(): void; /** * The building is out of view, so we can safely reset the map to the default map */ onOutOfView(): void; setMap(map: MappedinMap): Promise; } export default Building; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/scene-manager/dynamic-focus-scene-manager/dynamic-focus-scene' { import { Object3D } from 'three'; import { MappedinMap } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import type { ICore, MapObject } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { Building } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { LayerGroup } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.MapObject'; class DynamicFocusScene { buildings: Building[]; object: Object3D; panBounds: any; loaded: boolean; baseMapObject: MapObject; raycasters: any; baseMap: MappedinMap; options: { indoorsFullyVisibleZoomLevel: number; buildingFullyVisibleZoomLevel: number; setMapAtZoomLevel: number; baseMap: MappedinMap; preloadDefaultMaps: boolean; keepLayersActiveOnBaseMap: string[]; }; constructor(core: ICore, baseMap: MappedinMap); resize: () => void; buildRaycasters(): void; updateRaycasters(): void; /** * Expand the pan bounds to the base map bounds * In dynamic focus mode, these bounds will be retained no matter which building or map is visible */ expandToBaseMapBounds(): void; load(): Promise; currentMap: MappedinMap; setMap(map: MappedinMap, fromUserInteraction?: boolean): Promise; buildingVisiblityMap: Map; buildingsByPolygonId: Map; get buildingsInView(): Building[]; determineBuildingsInView(): Building[]; /** Given zoom and camera position, let's figure out the currently active map */ determineCurrentMap(): Promise; setOpacities(buildingsInView?: Building[], centerMap?: MappedinMap): void; createBuildings(buildingGeometries: [string, LayerGroup][]): Promise; } export default DynamicFocusScene; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/PolygonColorsController' { import { MappedinPolygon } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { ICore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/Core.interface'; type SetPolygonColorParam = [MappedinPolygon | string, string, { highlighted?: boolean; visible?: boolean; }?]; class PolygonColorsController { #private; constructor(core: ICore); /** * Given a polygon, set it to a specific color. * @param color - color value in hex */ setPolygonColor(...params: SetPolygonColorParam): Promise; clearPolygonColor(polygon: any): void; clearAllPolygonColors(): void; setPolygonOutlineColor(color: string): void; addPolygonOutline(polygon: MappedinPolygon): void; removePolygonOutline(polygon: MappedinPolygon): void; removeAllPolygonOutlines(): void; } export default PolygonColorsController; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/PolygonInteractionController' { import type { ICore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; class PolygonInteractionController { #private; constructor(core: ICore); addInteractivePolygon(polygon: any): void; addInteractivePolygonsForAllLocations(options: any): void; removeInteractivePolygon(polygon: any): void; removeAllInteractivePolygons(): void; } export default PolygonInteractionController; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/TooltipsController' { import { ICore, TCreateTooltipCommonOptions, TCreateTooltipOptions, SmartTooltip } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { MappedinNode, MappedinCoordinate } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; class TooltipsController { #private; constructor(core: ICore); createTooltip(nodeOrCoordinate: MappedinNode | MappedinCoordinate, /** * Html that will be placed inside a wrapper with its own styling in the tooltip */ contentHtml: string, options?: TCreateTooltipOptions): SmartTooltip; createCustomTooltip(nodeOrCoordinate: MappedinNode | MappedinCoordinate, /** * Html that will be displayed by the tooltip without any added styling */ contentHtml: string, selector: string, options?: TCreateTooltipCommonOptions): SmartTooltip; /** * Removes a {@link Tooltip} you have added previously. * * @param tooltip {Tooltip} A Tooltip that has previously been returned from {@link IMapView3D.createTooltip}. */ removeTooltip(tooltipOrTooltipId: SmartTooltip | SmartTooltip['id']): void; removeAllTooltips(): void; } export default TooltipsController; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/PolygonStatesController' { import type { ICore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; class PolygonStatesController { #private; constructor(core: ICore); updateClosedStateForPolygon(options: any): void; openAllPolygons(): void; destroy(): void; } export default PolygonStatesController; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/PolygonImagesController' { import { MappedinPolygon } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import type { ICore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; class PolygonImagesController { #private; constructor(core: ICore); enableImageFlippingForAllLocations(options: any): void; enableImageFlippingForPolygon(polygon: MappedinPolygon): void; disableImageFlippingForAllPolygons(): void; } export default PolygonImagesController; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/ThreeDMarkersController' { import { ThreeJSMarkerHandle } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import type { ICore, TCreateThreeDMarkerOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; class ThreeDMarkersController { #private; constructor(core: ICore); createThreeJSMarker(options: TCreateThreeDMarkerOptions): ThreeJSMarkerHandle; removeThreeJSMarker(markerHandle: ThreeJSMarkerHandle): boolean; removeAllThreeJSMarkers(): void; } export default ThreeDMarkersController; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/EventSystem' { import { Object3D, Color } from 'three'; import type { ICore, MappedinPolygon, Collider } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { BlueDotManager, Path } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; class EventSystem { core: ICore; blueDotManager?: BlueDotManager; rendererDomElement: any; currentHover: string | null; hoverLabel: any; hoverColor: Color; options: { disableHover: boolean; }; constructor(core: ICore); setBlueDotManager: (blueDotManager: any) => void; touchCount: number; zoomOut(): void; zoomIn(event: any): void; onPointerMove: (event: PointerEvent) => void; onPointerUp: (event: any) => void; /** * We've confirmed that a map click has occured, so handle that here */ handleMapClick(event: any): void; onPointerDown: (event: any) => void; incrementTouches: (event: any) => void; decrementTouches: (event: any) => void; clearMouse: () => void; getMousePos: (event: any) => { x: any; y: any; }; getScaledMousePos: (event: any) => { x: number; y: number; }; cursorPos: { x: number; y: number; }; mouse: { x: number; y: number; }; mouseDownStart: { time: number; clientX: number; clientY: number; }; scaledCursorPos: { x: number; y: number; }; hasTouched: boolean; calculateMouseCoordinates: (event: any) => void; getMouseRayIntersects: (objects: Object3D | Object3D[]) => import("three").Intersection>[]; detectCollidersUnderMouse: () => Collider[]; detectPolygonsUnderMouse: () => string[]; detectPathsUnderMouse: () => Path[]; detectWatermarkUnderMouse: (event: PointerEvent) => boolean; detectMapsUnderMouse: () => import("../../internal").MappedinMap[]; /** * Gets mouse click position in x y map coordinates */ getMouseMapPosition: () => { x: number; y: number; }; checkMouseIntersectsBlueDot: () => boolean; doHoverEffect: (event: PointerEvent) => void; onPolygonHoverOut: (polygonId: string) => boolean; onPolygonHoverOver: (polygon: MappedinPolygon | string) => boolean; setHoverColor: (color: string) => void; destroy(): void; } export default EventSystem; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.BinaryAssetManager' { import { Texture, TextureLoader } from 'three'; /** * This asset manager is used when loading a venue from MVF. * It requires the MVF's image and model binaries to be passed in upon instantiation. * This allows delaying the creation of Blobs and Object URLs until loading the map. */ export default class BinaryAssetManager { textureLoader: TextureLoader; data: Map; constructor(data: Map); /** * This should never be used- map polygons are never sent in binary format. */ loadMapPolygons(): Promise; loadImage(url: string): Promise; } } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.SmartCollisionEngine' { import './Mappedin.SmartCollisionEngine.scss'; import type { TRange, TColliderPosition } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.SmartCollider'; import type { MappedinMap } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import type { ICore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { Rectangle, QuadTree } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/quad-tree'; import { InternalFloatingLabel, InternalMarker, SmartTooltip } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; export type Collider = InternalMarker | SmartTooltip | InternalFloatingLabel; export type ColliderQuadTree = QuadTree<{ collider: Collider; }>; export const COLLIDER_STRATEGY_LOW_PRIORITY = "LOW_PRIORITY"; class SmartCollisionEngine { #private; colliderCanvas: HTMLCanvasElement; debugCanvas: HTMLCanvasElement; colliderCanvasContext: CanvasRenderingContext2D; debugCanvasContext: CanvasRenderingContext2D; collisionEngineContainerEl: HTMLDivElement; stepsX: any; stepsY: any; totalWidth: any; totalHeight: any; project: any; colliders: Map; offscreenRanges: TRange[]; get sortedColliders(): Collider[]; initialized: boolean; core: ICore; screen: Rectangle; debouncedUpdate: () => void; constructor(core: ICore); updateStartEvents: { [key: string]: boolean; }; updateEndEvents: { [key: string]: boolean; }; beginUpdate(): void; init: (container: HTMLDivElement, projectFn: (position: TColliderPosition, mapId: MappedinMap['id']) => { x: number; y: number; }) => void; handleBeginUpdate: (args: any) => void; handleEndUpdate: (args: any) => void; qtree: QuadTree; interactiveCollidersQTree: ColliderQuadTree; recompute: () => void; draw: () => void; reposition: () => void; add: (colliderId: string, collider: Collider) => void; remove: (colliderId: string) => void; updateMap: (colliderId: string, from: string, to: string) => void; update: () => void; resize: (container: any) => void; destroy: () => void; } /** * Determines collider visibility based on the current mapId, dynamicFocus options, and visibleLayersInCurrentScene. * 1. If the collider is on the base map and has a layer included in keepLayersActiveOnBaseMap, show it. * 2. Otherwise, if the collider is on the current map and has a layer included in visibleLayersInCurrentScene, show it. * 3. Otherwise, if the collider has no layer and is on the current map, show it. * 4. Otherwise, hide it. */ export function isColliderVisible(collider: Collider, mapId: string, dynamicFocusOptions: ICore['options']['dynamicFocus'], visibleLayersInCurrentScene: ICore['visibleLayersInCurrentScene']): boolean; /** * Determines if a collider should be shown on the base map, even when the dynamicFocus has setMap to a different map. * Collider must have an assigned layer included in the keepLayersActiveOnBaseMap option & matching mapId to the base map. */ export function shouldKeepActiveOnBaseMap(collider: Collider, dynamicFocusOptions: ICore['options']['dynamicFocus']): boolean; export default SmartCollisionEngine; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/BillboardManager' { import { Object3D } from 'three'; class BillboardManager { orbit: Object3D; billboards: Map; constructor(orbit: Object3D); add(object: Object3D, axis?: string): void; remove(sprite: Object3D): void; update(): void; destroy(): void; } export default BillboardManager; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/StackedMapsController' { import type { MappedinDirections, MappedinMap, MappedinNode } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import { STACKED_MAPS_STATE, MapViewScene, MapViewStackScene, CAMERA_EASING_MODE } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import type { ICore, TCameraTransform, TCameraAnimationOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import type { TStackedMapsOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types'; enum ACTION { enable = "enable", disable = "disable", showOverview = "showOverview", zoomInToMap = "zoomInToMap", scrollToMap = "scrollToMap", restack = "restack" } type TTargetTransitionFunction = ((options: TParams) => () => Promise) | ((options: TParams) => void); type TParams = { map: MappedinMap; } | { directions: MappedinDirections | MappedinDirections[]; } | { stackScene: MapViewStackScene; directions: MappedinDirections | MappedinDirections[]; verticalDistanceBetweenMaps?: number; animationOptions?: TCameraAnimationOptions; } | { stackScene: MapViewStackScene; verticalDistanceBetweenMaps?: number; map: MappedinMap; nodes: MappedinNode[]; cameraOptions?: TCameraTransform & TCameraAnimationOptions; duration?: number; animationOptions?: TCameraAnimationOptions; } | { stackScene: MapViewStackScene; map: MappedinMap; nodes: MappedinNode[]; rotation: number; cameraOptions?: TCameraTransform & TCameraAnimationOptions; verticalDistanceBetweenMaps?: number; duration?: number; animationOptions?: TCameraAnimationOptions; }; type TActionFn = [STACKED_MAPS_STATE, TTargetTransitionFunction[]]; type TState = { [stateName in STACKED_MAPS_STATE]?: { actions: { [actionName in ACTION]?: TActionFn; }; }; }; export type TInternalTransitionOptions = { animate?: boolean; }; class StackedMapsController { #private; options: TStackedMapsOptions; enabled: boolean; stackScene: MapViewStackScene; constructor(core: ICore); needsUpdate: boolean; currentState: STACKED_MAPS_STATE; mapsInStack: MappedinMap[]; get mapIdsInStack(): string[]; getZoomIntoMapOptions: (params: TParams) => (MapViewScene | { activeMap: MappedinMap; focusOn: { targets: { nodes: MappedinNode[]; }; options: { zoom?: number; tilt: number; rotation: number; position?: MappedinNode | import("../../internal").MappedinCoordinate; duration?: number; easing: CAMERA_EASING_MODE; }; }; })[]; getDisableOptions: (params: TParams) => (MapViewScene | { activeMap: MappedinMap; })[]; getShowOverviewOptions: (params: TParams) => (MapViewStackScene | { activeMap: MappedinMap; focusOn: { options: { duration: number; easing?: CAMERA_EASING_MODE; tilt: number; }; }; verticalDistanceBetweenMaps: number | "auto"; })[]; getScrollToMapOptions: (params: TParams) => (MapViewStackScene | { focusOn: { targets: { nodes: MappedinNode[]; }; options: { tilt: number; easing: CAMERA_EASING_MODE; }; }; activeMap: MappedinMap; duration: number; })[]; getRestackOptions: (params: TParams) => (MapViewStackScene | { activeMap: MappedinMap; focusOn: { options: { tilt: number; duration: number; }; }; verticalDistanceBetweenMaps: number | "auto"; })[]; getEnableOptions: () => void; getShowOverviewTransition: (options: any, inTransit?: boolean) => () => Promise; getZoomInToMapTransition: (options: any) => () => Promise; getScrollToMapTransition: (options: any, inTransit?: boolean) => () => Promise; getRestackTransition: (options: any, inTransit?: boolean) => () => Promise; getDisableTransition: (options: any) => () => Promise; getEnableTransition: () => () => void; states: TState; get determineMapStack(): MappedinMap[]; transition(currentState: STACKED_MAPS_STATE, actionName: ACTION): TTargetTransitionFunction[] | void; exec(transitions: TTargetTransitionFunction[] | void, params: TParams): Promise; transitionInProgress: Promise; transitionResolved: any; disable: () => Promise; enable: (opts?: TStackedMapsOptions) => Promise; publishChangeEvent: () => void; get nodesInJourneyOrMap(): MappedinNode[]; showOverview: (animationOptions?: TCameraAnimationOptions) => Promise; scrollToMap: (map: MappedinMap, duration?: number) => Promise; restack: (options?: TStackedMapsOptions) => Promise; zoomInToMap: (map: MappedinMap, cameraOptions?: TCameraTransform & TCameraAnimationOptions) => Promise; get currentMap(): MappedinMap; } /** * @internal */ export function setStackedMapsOverviewTiltInDegrees(v: number): void; export default StackedMapsController; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/ExportController' { import type { ICore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; /** * @hidden */ export type TGLTFExportOptions = { onlyVisible?: boolean; binary?: boolean; scale?: number; }; /** * API for exporting the scene. * * @hidden */ export default class ExportController { #private; core: ICore; glTFExporter?: any; constructor(core: ICore); /** * Exports the current scene as a GLTF file. */ getCurrentSceneGLTF: (userOptions: TGLTFExportOptions) => Promise; } } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/LayerController' { import type { ICore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/Core.interface'; import { MappedinMap } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import { Feature, FeatureCollection, GeoJsonProperties, Polygon } from 'geojson'; class LayerController { #private; constructor(core: ICore); /** * Show a set of layers on the current map, and hide all other layers. This also hides any colliders associated with the hidden layers. */ showLayers(layers: string[]): void; getAllLayersForMap(map: MappedinMap): Promise<{ [layerName: string]: boolean; }>; /** * Return a list of all visible layers for a map, this will NOT trigger a map load, and is mainly used internally * which is why its synchronous */ getVisibleLayersForLoadedMap(map: MappedinMap): string[]; addGeoJSONLayer(layerName: string, featureOrFeatureCollection: Feature | FeatureCollection): Promise; removeGeoJSONLayer(layerName: string): Promise; } export default LayerController; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.ui' { import { IBlueDotCore, BlueDotManager } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { IPubSub } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/pub-sub'; import type { ICore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; enum ZOOM_CONDITION { EXPIRED = 0, IN_PROGRESS = 1, COMPLETED = 2 } export interface IBlueDotUI extends IPubSub { blueDotTooltips: any[]; setBlueDotPosition: () => void; showBlueDotBearing: () => void; addGhostMarkers: () => void; addLocationUncertainMarkersAndTooltips: () => void; addBlueDotMarker: () => void; removeTooltips: () => void; removeBlueDot: () => void; centerBlueDot: () => void; endFollowing: () => void; zoomCondition: ZOOM_CONDITION; isFollowing: boolean; useRotationMode: boolean; } type TBlueDotUIProps = { core: ICore; blueDotManager: BlueDotManager; controller: IBlueDotCore; data: any; }; const BlueDotUI: ({ core, blueDotManager, controller }: TBlueDotUIProps) => IBlueDotUI; export default BlueDotUI; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/utils' { export * from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/utils/utils'; export { shouldDisableOffscreenCanvas } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/utils/browser'; export { throttle, debounce } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/utils/async'; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/MapView' { import '../internal/Mappedin.css'; import { Mappedin, MappedinCoordinate, MappedinLocation, MappedinMap, MappedinNode, MappedinPolygon } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import { E_SDK_EVENT_PAYLOAD, TCreateMarkerOptions, TLabelAllLocationFlatLabelOptions, TLabelAllLocationFloatingLabelOptions, TMapViewOptions, TPathOptions, TCreateTooltipCommonOptions, TCreateTooltipOptions, TAOConfiguration, TAntialiasConfiguration } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types'; import { E_SDK_EVENT, STATE } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.enums'; import SmartTooltip from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/Mappedin.SmartTooltip'; import { Marker } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/MarkersController'; import { PubSub } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import Journey from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Journey'; import { TGetPolygonsAtCoordinateOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { IFlatLabels } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/FlatLabels'; import { IFloatingLabels } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/FloatingLabels'; import { Markers } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Markers'; import { Paths } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Paths'; import { BlueDot } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/BlueDot'; import { Camera } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Camera'; import { Exporter } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Exporter'; import { StackedMaps } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/StackedMaps'; import OutdoorView from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/OutdoorView'; import { Layers } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Layers'; import { DynamicFocus } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/DynamicFocus'; /** * Primary API class for controlling and interacting with a 3D map. */ export class MapView extends PubSub { #private; /** * API for representing sets of directions on the map. */ Journey: Journey; /** * API for controlling the camera in the scene. */ Camera: Camera; /** * API for controlling flat labels. */ FlatLabels: IFlatLabels; /** * API for exporting the scene. * * @hidden */ Exporter: Exporter; /** * API for controlling floating labels. */ FloatingLabels: IFloatingLabels; /** * API for adding 2D markers. */ Markers: Markers; /** * API for drawing arbitrary paths. */ Paths: Paths; /** * API for handling a user's position on the map. */ BlueDot: BlueDot; /** * The options that the mapView was instantiated with. */ options: TMapViewOptions; /** * @experimental * API for showing multiple maps as a vertical stack. */ StackedMaps: StackedMaps; /** * @experimental * API to control outdoor context rendering. */ OutdoorView: OutdoorView; /** * @experimental * API to control layer visibility. */ Layers: Layers; /** * @experimental * API to dynamically set the map focus as you pan over map groups. */ DynamicFocus?: DynamicFocus; /** * @hidden */ constructor(container: HTMLElement, venue: Mappedin, options?: TMapViewOptions & { onFirstMapLoaded: () => void; }); /** * Label all locations using 2D floating labels (with options {@link TLabelAllLocationFloatingLabelOptions}), * or flat 3D labels on top of the polygons themselves (with options {@link TLabelAllLocationFlatLabelOptions}) * * @deprecated Please use {@link FloatingLabels.labelAllLocations} or {@link FlatLabels.labelAllLocations} instead. * This may be removed in a future version of the SDK. The array this returns is now always empty. */ labelAllLocations(options?: TLabelAllLocationFloatingLabelOptions | TLabelAllLocationFlatLabelOptions): any[]; /** * Get the nearest {@link MappedinNode} on a map to an XY-coordinate on the screen. * This can be useful for generating directions from an arbitrary point on the map. * * ``` * // Get the nearest node on map[0] to (100,100) * const nearestNode = mapView.getNearestNodeByScreenCoordinates(100, 100, mapView.venue.maps[0]); * const destination = mapView.venue.locations.find((l) => l.name === "Apple")!; * * // Find out how to get from that node to Apple * const directions = nearestNode.directionsTo(destination); * ``` * * @param x The x position of a coordinate on the screen. * @param y The y position of a coordinate on the screen. * @param mapOrMapId The {@link MappedinMap} the node should belong to. */ getNearestNodeByScreenCoordinates(x: number, y: number, mapOrMapId?: MappedinMap | MappedinMap['id']): MappedinNode; /** * Subscribe a function to an {@link E_SDK_EVENT}. * * ```ts * // Set a polygon to be red when it is clicked * const mapClickHandler = ({ polygons }: E_SDK_EVENT_PAYLOAD["CLICK"]) => { * if (polygons.length > 0) { * mapView.setPolygonColor(polygons[0], 'red'); * } * } * mapView.on(E_SDK_EVENT.CLICK, mapClickHandler); * ``` * * @param eventName An {@link E_SDK_EVENT} which, when fired, will call the provided * function. * @param fn A callback that gets called when the corresponding event is fired. The * callback will get passed an argument with a type that's one of {@link E_SDK_EVENT_PAYLOAD}. */ on: PubSub['on']; /** * Unsubscribe a function previously subscribed with {@link on} from * and {@link E_SDK_EVENT}. * * ```ts * mapView.on(E_SDK_EVENT.CLICK, mapClickHandler); * * ... * * // Something changed and I no longer want this event * mapView.off(E_SDK_EVENT.CLICK, mapClickHandler); * ``` * * @param eventName An {@link E_SDK_EVENT} to which the provided function was previously * subscribed. * @param fn A function that was previously passed to {@link on}. The function must * have the same reference as the function that was subscribed. */ off: PubSub['off']; /** * Set state of the mapView to one of {@link STATE}. * * @param state The {@link STATE} to set the SDK to. */ setState(state: STATE): Promise; /** * The current {@link STATE} on the mapView. */ get state(): STATE; /** * The {@link Mappedin} data this mapView is using. */ get venue(): Mappedin; /** * The HTML element that the mapView is rendered into. */ get container(): HTMLElement; /** * The current {@link MappedinMap} being displayed. */ get currentMap(): MappedinMap; /** * Prevent any polygons from showing a hover effect and being clicked on. * See also {@link addInteractivePolygon} and {@link addInteractivePolygonsForAllLocations}. * * ```ts * mapView.removeAllInteractivePolygons() * ``` */ removeAllInteractivePolygons(): void; /** * Change the currently displayed {@link MappedinMap} to a new one. * * ```ts * await mapView.setMap(mapView.venue.maps[1]); * ``` * * @param mapOrMapId The {@link MappedinMap} to display. * @returns A promise that resolves when the map is fully switched. */ setMap(mapOrMapId: MappedinMap | string): Promise; /** * Given a {@link MappedinPolygon}, set it to a specific color. * * ```ts * // Find the polygons of the Apple store and change them to blue * const location = mapView.venue.locations.find((l) => l.name === "Apple")!; * for (const polygon of location.polygons) { * mapView.setPolygonColor(polygon, "#0000ff"); * } * ``` * * @param polygon The {@link MappedinPolygon} to change the color of. * @param color A hexidecimal color string to use as the new color. */ setPolygonColor(polygon: MappedinPolygon, color: string): void; /** * Resets a {@link MappedinPolygon} back to it's original color. See also {@link clearAllPolygonColors} and * {@link setPolygonColor}. If the user is hovering over a polygon, it will still * have the hover color set by {@link setHoverColor}. * * ```ts * mapView.setPolygonColor(polygon, "#0000ff"); * * ... * * // Reset the polygon color * mapView.clearPolygonColor(polygon); * ``` * * @param polygonOrPolygonId The {@link MappedinPolygon} to reset the color of. */ clearPolygonColor(polygonOrPolygonId: MappedinPolygon | string): void; /** * Resets all {@link MappedinPolygon} instances back to their original colors. See also {@link clearPolygonColor} and * {@link setPolygonColor}. If the user is hovering over a polygon, it will still * have the hover color set by {@link setHoverColor}. * * ```ts * mapView.clearAllPolygonColors(); * ``` */ clearAllPolygonColors(): void; /** * @experimental * Sets a color that the outline of a {@link MappedinPolygon} instance will receive. * If no color is set the outline will default to red (#ff0000). See also {@link addPolygonOutline}, * {@link removePolygonOutline} and {@link removeAllPolygonOutlines}. * * ```ts * mapView.setPolygonOutlineColor("#0000ff"); * ``` * * @param color The color to set the outline to. */ setPolygonOutlineColor(color: string): void; /** * @experimental * Given a {@link MappedinPolygon}, the polygon will be outlined. The outline color of the polygon is * set using {@link setPolygonOutlineColor}, the default color is red (#ff0000). See also * {@link removePolygonOutline} and {@link removeAllPolygonOutlines}. * * ```ts * // Find the polygons of the Apple store and change them to blue * const location = mapView.venue.locations.find((l) => l.name === "Apple")!; * for (const polygon of location.polygons) { * mapView.addPolygonOutline(polygon); * } * ``` * * @param polygon The {@link MappedinPolygon} to outline. */ addPolygonOutline(polygon: MappedinPolygon): void; /** * @experimental * Removes the outline on a {@link MappedinPolygon}. See also {@link setPolygonOutlineColor}, * {@link addPolygonOutline} and {@link removeAllPolygonOutlines}. * * ```ts * mapView.setPolygonOutlineColor("#0000ff"); * mapView.addPolygonOutline(polygon); * * ... * * // Remove the outline from the polygon * mapView.removePolygonOutline(polygon); * ``` * * @param polygon The {@link MappedinPolygon} to remove the outline of. */ removePolygonOutline(polygon: MappedinPolygon): void; /** * @experimental * Removes outlines on all {@link MappedinPolygon} instances. See also {@link setPolygonOutlineColor}, * {@link addPolygonOutline} and {@link removePolygonOutline}. * * ```ts * mapView.setPolygonOutlineColor("#0000ff"); * mapView.addPolygonOutline(polygon1); * mapView.addPolygonOutline(polygon2); * * ... * * // Remove the outline from all polygons * mapView.removeAllPolygonOutlines(); * ``` */ removeAllPolygonOutlines(): void; /** * Makes a {@link MappedinPolygon} interactive. This means it will receive a hover effect and * respond to the `CLICK` {@link E_SDK_EVENT}. See also {@link on} and {@link addInteractivePolygonsForAllLocations}. * * ```ts * // Make all washroom polygons clickable * const washroom = mapView.venue.find((l) => l.name === "Washroom")!; * for (const polygon of washroom.polygons) { * mapView.addInteractivePolygon(polygon); * } * * // Now they will be populated in click events * mapView.on(E_SDK_EVENT.CLICK, ({ polygons }) -> { * if (polygons.length > 0) { * console.log("Clicked on a washroom!"); * } * }) * ``` * * @param polygonOrPolygonId The {@link MappedinPolygon} to make interactive. */ addInteractivePolygon(polygonOrPolygonId: MappedinPolygon | string): void; /** * Makes all {@link MappedinPolygon} instances with an attached {@link MappedinLocation} interactive. * This means they will receive a hover effect and respond to the `CLICK` {@link E_SDK_EVENT}. See also * {@link on} and {@link addInteractivePolygon}. * * ```ts * mapView.addInteractivePolygonsForAllLocations(); * * // Now all polygons with locations can be clicked * mapView.on(E_SDK_EVENT.CLICK, ({ polygons }) => { * if (polygons.length > 0) { * for (const polygon of polygons) { * console.log(`clicked on ${polygon.locations[0].name}`) * } * } * }); * ``` */ addInteractivePolygonsForAllLocations(options?: { /** * A list of Location types to skip. All locations of this type will be exluded from becoming interactive */ excludeTypes?: string[]; /** * An array of Location objects. Overrides the default of making all locations interactive, and instead applies to only the locations specified here. */ locations?: MappedinLocation[]; }): void; /** * Makes a polygon no longer hoverable/clickable. See also {@link addInteractivePolygon} and * {@link addInteractivePolygonsForAllLocations}. * * @param polygonOrPolygonId The {@link MappedinPolygon} to make no longer interactive. */ removeInteractivePolygon(polygonOrPolygonId: MappedinPolygon | string): void; /** * Attach any HTML to a {@link MappedinNode} or {@link MappedinCoordinate}, and have the marker interact and collide with smart labels and tooltips * @deprecated use {@link Markers.add} instead. */ createMarker(nodeOrCoordinate: MappedinNode | MappedinCoordinate, contentHtml: string, options?: TCreateMarkerOptions): Marker; /** * Remove Marker * @deprecated use {@link Markers.remove} instead. */ removeMarker(markerOrMarkerId: Marker | Marker['id']): void; /** * Removes all Markers (from all Maps, not just the current one). * @deprecated use {@link Markers.removeAll} instead. */ removeAllMarkers(): void; /** * Remove all tooltips created with {@link createTooltip} or {@link createCustomTooltip}. * * ```ts * mapView.removeAllTooltips(); * ``` */ removeAllTooltips(): void; /** * Create a tooltip with default styling that the MapView will attempt to position in 3D space. The tooltip will be anchored * to a specified node or coordinate in one of eight anchor orientations. * * The possible anchor types are `top`, `bottom`, `left`, `right`, `topLeft`, `topRight`, `bottomLeft`, and `bottomRight`. This * describes the position of the tooltip relative to the node or coordinate to which it is attached. * * The tooltip is rendered into the DOM with the following structure. * * ```jsx *
*
* {contentHtml} * * * ``` * * The `.mappedin-tooltip` element controls the position and has a class in the form of `.tooltip--anchor-{type}` that indicates * the current anchor type. * * @param nodeOrCoordinate A {@link MappedinNode} or {@link MappedinCoordinate} the tooltip is attached to. * @param contentHtml Stringified HTML content to render within the tooltip. * @param options {@link TCreateTooltipOptions} for rendering the tooltip */ createTooltip( /** * Node or Coordinate to attach the tooltip to */ nodeOrCoordinate: MappedinNode | MappedinCoordinate, contentHtml: string, options?: TCreateTooltipOptions): SmartTooltip; /** * Create a tooltip with no default styling that the MapView will attempt to position in 3D space. The tooltip will be anchored * to a specified node or coordinate in one of eight anchor orientations. * * The possible anchor types are `top`, `bottom`, `left`, `right`, `topLeft`, `topRight`, `bottomLeft`, and `bottomRight`. This * describes the position of the tooltip relative to the node or coordinate to which it is attached. * * Unlike {@link createTooltip}, a custom tooltip is rendered without any additional wrappers, leaving styling entirely up to the * external developer. The top-most element will be injected with a class in the form of `.tooltip--anchor-{type}` that indicates * the current anchor type. * * @param nodeOrCoordinate A {@link MappedinNode} or {@link MappedinCoordinate} the tooltip is attached to. * @param contentHtml Stringified HTML content to render within the tooltip. The contents must be `position: absolute` in order to interact with the collision engine. * @param selector A CSS selector string that allows the SDK to target the tooltip. This is required because we do not inject any default styling. * @param options {@link TCreateTooltipCommonOptions} for rendering the tooltip */ createCustomTooltip( /** * Node or Coordinate to attach the tooltip to */ nodeOrCoordinate: MappedinNode | MappedinCoordinate, contentHtml: string, selector: string, options?: TCreateTooltipCommonOptions): SmartTooltip; /** * Removes a Tooltip you have added previously. * * @param tooltipOrTooltipId A Tooltip or Tooltip id that has previously been returned from {@link MapView.createTooltip}. */ removeTooltip(tooltipOrTooltipId: SmartTooltip | SmartTooltip['id']): void; /** * Let any image attached to a Polygon attached to a Location flip 180 degrees with the camera * so it's always upright. See also {@link enableImageFlippingForPolygon}. * * ```ts * mapView.enableImageFlippingForAllLocations(); * ``` */ enableImageFlippingForAllLocations(options?: { /** * A list of Location types to skip, if for some reason there are Locations that have logos that shouldn't flip. */ excludeTypes?: string[]; /** * An array of Location objects, or Location IDs. If excludeTypes is not sufficient you can explicitly set the Locations you are marking to flip. You can also call {@link MapView.enableImageFlippingForPolygon} manually for every polygon you care about instead. */ locations?: MappedinLocation[] | string[]; }): void; /** * Mark a specific {@link MappedinPolygon} so, if it has an image, it rotates with the camera. * See also {@link enableImageFlippingForAllLocations}. * * ```ts * // Enable image flipping for locations with type "Anchor" * const anchorStores = mapView.venue.locations.filter((l) => l.type === "Anchor"); * for(const store of anchorStores) { * for(const polygon of anchorStores.polygons) { * mapView.enableImageFlippingForPolygon(polygon); * } * } * ``` * * @param polygon The {@link MappedinPolygon} to enable image flipping for. */ enableImageFlippingForPolygon(polygon: MappedinPolygon): void; /** * Disable image flipping that was enabled with {@link enableImageFlippingForPolygon} or * {@link enableImageFlippingForAllLocations}. */ disableImageFlippingForAllPolygons(): void; /** * @deprecated Use {@link Paths.add} instead. * * Draws an entire path. It takes a list of Nodes and will break them into separate pathSegments on every map change, putting the resultant segment on the right Map. * * @param path An array of Nodes, probably from a Node's {@link MappedinNode.directionsTo} call. * @return An array of pathSegment ids. */ drawPath(path: MappedinNode[], options?: TPathOptions): string; /** * @deprecated Use {@link Paths.remove} instead. * * Remove a path by id */ removePath(pathId: string): void; /** * @deprecated Use {@link Paths.removeAll} instead. * * Removes all pathSegments from all Maps. */ removeAllPaths(): void; /** * Sets the color of empty space in the scene. Useful for matching the aesthetics of the * surrounding website of application. Otherwise the container element will be white where * there is no map visible. * * ```ts * // Make the background a dark grey * mapView.setBackgroundColor("#050505"); * ``` * * @param color A hexidecimal color string to use. * @param alpha A number between 0 and 1 representing opacity. */ setBackgroundColor(color: string, alpha?: number): void; /** * Sets the color that all {@link MappedinPolygon} instances will receive when they are * beneath a cursor. This only applies to interactive polygons set using {@link addInteractivePolygon} * or {@link addInteractivePolygonsForAllLocations}. Hover colors set by {@link setPolygonHoverColor} will take * precedence over this value. * * ```ts * // Make all location polygons interactive and have a red hover color * mapView.addInteractivePolygonsForAllLocations() * mapView.setHoverColor("#ff0000"); * ``` */ setHoverColor(color: string): void; /** * Sets a color that a {@link MappedinPolygon} instance will receive when it is beneath a cursor. * This will take precedence over the value set by {@link setHoverColor} and only applies to an interactive polygon set using {@link addInteractivePolygon} * or {@link addInteractivePolygonsForAllLocations}. See also {@link clearPolygonHoverColor} and {@link clearAllPolygonHoverColors}. * * ```ts * // Make polygon interactive and have a red hover color * mapView.addInteractivePolygon(polygon); * mapView.setPolygonHoverColor(polygon, "#ff0000"); * ``` */ setPolygonHoverColor(polygon: MappedinPolygon, color: string): void; /** * Resets a {@link MappedinPolygon} back to it's original hover color or the default hover color set by * {@link setHoverColor}. See also {@link clearAllPolygonHoverColors} and {@link setPolygonHoverColor}. * * ```ts * mapView.setPolygonHoverColor(polygon, "#ff0000"); * * ... * * // Reset polygon to origin hover color * mapView.clearPolygonHoverColor(polygon); * ``` */ clearPolygonHoverColor(polygon: MappedinPolygon): void; /** * Resets all {@link MappedinPolygon} instances back to their original hover colors or the default hover color set by * {@link setHoverColor}. See also {@link clearPolygonHoverColor} and {@link setPolygonHoverColor}. * * ```ts * mapView.setPolygonHoverColor(polygon1, "#ff0000"); * mapView.setPolygonHoverColor(polygon1, "#00ff00"); * * ... * * mapView.clearAllPolygonHoverColors(); * ``` */ clearAllPolygonHoverColors(): void; /** * @deprecated This should no longer need to be called externally and is now a no-op. */ tryRendering(_renderMode?: any): void; /** * Finds the main {@link MappedinLocation} associated with a {@link MappedinPolygon}. * This means a location attached to the polygon that has no parents, or, if there * are none of those, a location nearest the top of some hierarchy that does have the * polygon attached. * * This means if there are multiple hierarchies of locations attached to the polygon, * the one that gets returned is not guaranteed to be what you want. * * ``` * // Log the primary location of a clicked polygon * mapView.on(E_SDK_EVENT.CLICK, ({ polygons }) => { * if (polygons.length > 0) { * for(const polygon of polygons) { * console.log(mapView.getPrimaryLocationForPolygon(polygon)); * } * } * }); * ``` * * @param polygon The {@link MappedinPolygon} you want the primary location of. */ getPrimaryLocationForPolygon(polygon: MappedinPolygon): MappedinLocation; /** * Finds all {@link MappedinPolygon} instances that contain the specified {@link MappedinCoordinate}. * If multiple polygons are stacked on top of each other, the array of polygons returned will be * in the order of top to bottom. * * By default, this only considers interactive polygons set through {@link addInteractivePolygon} or * {@link addInteractivePolygonsForAllLocations}. This behaviour can be changed by passing * `options.includeNonInteractive`. * * ```ts * const polygons = mapView.getPolygonsAtCoordinate(coordinate); * ``` * * @param coordinate The {@link MappedinCoordinate} to check. * @param options * @returns An array of {@link MappedinPolygon} instances intersecting the given coordinate. */ getPolygonsAtCoordinate(coordinate: MappedinCoordinate, options?: TGetPolygonsAtCoordinateOptions): MappedinPolygon[]; /** * Finds all {@link MappedinPolygon} instances that intersect the specified XY-coordinate on screen. * If multiple polygons are stacked on top of each other, the array of polygons returned will be * in the order of top to bottom. * * By default, this only considers interactive polygons set through {@link addInteractivePolygon} or * {@link addInteractivePolygonsForAllLocations}. This behaviour can be changed by passing * `options.includeNonInteractive`. * * ```ts * const polygons = mapView.getPolygonsAtScreenCoordinate(100, 100); * ``` * * @param x The x value of a screen coordinate * @param y The y value of a screen coordinate * @param options * @returns An array of {@link MappedinPolygon} instances intersecting the given coordinate. */ getPolygonsAtScreenCoordinate(x: number, y: number, options?: TGetPolygonsAtCoordinateOptions): MappedinPolygon[]; /** * Create a {@link MappedinCoordinate} on a given {@link MappedinMap} from an XY-coordinate on screen. * * @param x The x value of a screen coordinate. * @param y The y value of a screen coordinate. * @param map The {@link MappedinMap} the coordinate should belong to. * @returns A {@link MappedinCoordinate} on the given map. */ getMappedinCoordinateAtScreenCoordinate(x: number, y: number, map: MappedinMap): MappedinCoordinate; setAmbientOcclusionSettings(settings: TAOConfiguration): void; setAntialiasSettings(settings: TAntialiasConfiguration): void; /** * Destroy the mapView instance and reclaim memory. * * NOTE: this does not destroy the instance of {@link Mappedin} that was passed in. For applications that * require destroying and re-creating the mapView, it is recommended to keep the {@link Mappedin} object * around. * * ```ts * mapView.destroy(); * ``` */ destroy(): void; } } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/outdoor-context/Mappedin.TileManager' { import type { ICore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { MappedinCoordinate, MappedinMap } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import { Tile } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/outdoor-context/Mappedin.Tile'; import { IOutdoorContextProvider } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/outdoor-context/Outdoor-Context.provider'; /** * @deprecated Use {@link OutdoorView} instead. */ export enum TILE_RENDER_MODES { NORMAL = 0, AGGRESSIVE = 1 } export const TILE_COLOR = "#f0f0f1"; /** * @deprecated Use {@link OutdoorView} instead. */ export type TTileManagerOptions = { tileRenderMode?: TILE_RENDER_MODES; provider: IOutdoorContextProvider; /** * How many times bigger the bounding box should be than the map's longest side */ boundingBoxMultiplier?: number; }; export class TileManager { #private; static ENABLED: boolean; static OPTIONS: TTileManagerOptions; tileSize: number; token: string; apiKey?: string; tileRenderMode: TILE_RENDER_MODES; currentAbortController: AbortController; attributionEl: HTMLDivElement; outdoorContextProvider: IOutdoorContextProvider; constructor(core: ICore); createAttributionEl(): void; renderVisibleTiles: () => void; _renderVisibleTiles(): void; cachedZoomLevel: number; visible: boolean; fadeOut(): Promise; fadeIn(): Promise; fetchTiles(): void; zoomLevelToAltitudeMap: number[][]; plane: any; tiles: Tile[]; maskMeshBoundingBox?: any; fetchTilesForZoomLevel(zoomLevel: number): Promise; /** * This function populates a layer of tiles starting from the center clockwise * * Here's an example of layer = 1 * * [ ][ ][ ][ ][ ] * [ ][1][2][3][ ] * [ ][8][X][4][ ] * [ ][7][6][5][ ] * [ ][ ][ ][ ][ ] */ populateLayer(layerId: number, center: MappedinCoordinate, zoomLevel: number, metersPerTile: number, referenceMap: MappedinMap): void; checkIfTileIsInBoundingBox(tile: Tile): any; } } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Camera' { import { E_CAMERA_DIRECTION } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.enums'; import CameraController, { TCameraAnimationOptions, TCameraInteractionsSetOptions, TCameraTargets, TCameraTransform, TFocusOnCameraOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/CameraController'; /** * API to control and respond to the state of the camera within the scene. */ export class Camera { #private; /** * @hidden */ constructor(controller: CameraController); /** * Subscribe a function to be called when an {@link E_CAMERA_EVENT} is fired. * * ```ts * const cameraChangedHandler = ({ tilt, position, zoom, rotation }) => { * // Do something with the new values * }; * mapView.Camera.on(E_CAMERA_EVENT.CHANGED, cameraChangedHandler); * ``` * * @param eventName An {@link E_CAMERA_EVENT} that is fired when the camera changes. * @param fn A callback that gets called when the corresponding event is fired. The * callback will get passed an argument with a type that's one of {@link CAMERA_EVENT_PAYLOAD}. */ on: CameraController['on']; /** * Unsubscribe a function that was previously subscribed with {@link on}. * * ```ts * mapView.Camera.on(E_CAMERA_EVENT.CHANGED, cameraChangedHandler); * * ... * * // Something changed and I no longer want this event to fire * mapView.Camera.off(E_CAMERA_EVENT.CHANGED, cameraChangedHandler); * ``` * * @param eventName An {@link E_CAMERA_EVENT} that is fired when the camera changes. * @param fn A function that was previously passed to {@link on}. The function must * have the same reference as the function that was subscribed. */ off: CameraController['off']; /** * The current camera animation, if any. Resolves when the animation finishes. */ get currentAnimation(): Promise; /** * Current Camera zoom (in meters) */ get zoom(): number; /** * Current Camera rotation (in radians) from north */ get rotation(): number; /** * Current camera tilt angle (in radians), relative to a top-down view. * * ex: 0 means the camera is facing top-down, π/2 means the camera is * facing directly from the side. */ get tilt(): number; /** * Get the minimum distance (in meters) the camera is allowed to get to the ground. */ get minZoom(): number; /** * Set the minimum distance (in meters) the camera is allowed to get to the ground. */ set minZoom(meters: number); /** * Get the maximum distance (in meters) the camera is allowed to get from the ground. */ get maxZoom(): number; /** * Set the maximum distance (in meters) the camera is allowed to get from the ground. */ set maxZoom(meters: number); /** * Get the current maximum tilt angle (in radians) the camera is allowed to use. */ get maxTilt(): number; /** * Sets the maximum tilt angle (in radians) the camera is allowed to use. * * Tilt angle must be between 0 and π/2 radians. It will be clamped within * this range if it exceeds it on either end. * * As tilt angle approaches π/2 radians, this will impact overall touch controls * and should be used sparingly. */ set maxTilt(radians: number); /** * Get the current camera position, which is at the center of the map. * @returns the position as a coordinate */ get position(): import("../../internal").MappedinCoordinate; /** * Enable or disable the ability for the user to interact with the camera (e.g. pan, zoom, tilt, etc). * This does not affect programmatic camera controls, such as {@link set} and {@link focusOn}. * * ```ts * // The user can no longer interact to move the camera * mapView.Camera.interactions.disable(); * * // The user can now interact to move the camera again * mapView.Camera.interactions.enable(); * ``` */ interactions: { /** * Enable or disable specific user interactions. * * ```ts * mapView.Camera.interactions.set({ zoom: false }); * ``` * * @param options An object defining the interactions to switch on or off. * */ set: (options: TCameraInteractionsSetOptions) => void; /** * Enable all user interactions. */ enable: () => void; /** * Disable all user interactions. */ disable: () => void; }; /** * Define an area of the screen that is safe for the camera. Anything outside the safe area is * assumed to be covered in some way (e.g. by UI) meaning the camera will not place * any map elements there when calling {@link focusOn}. * * ```ts * // The top 100px of the canvas are covered by a UI element * mapView.Camera.setSafeAreaInsets({ top: 100, left: 0, bottom: 0, right: 0}); * mapView.Camera.focusOn({ nodes }); * ``` * * @param insets An object defining a number of pixels from the top, left, bottom, and right of * the screen. Only the area within the padding defined by these pixels is considered safe. */ setSafeAreaInsets(insets: { top: number; left: number; bottom: number; right: number; }): void; /** * Retrieve the values previously set by {@link setSafeAreaInsets}. * * @returns An object defining a number of pixels from the top, left, bottom, and right of * the screen. */ getSafeAreaInsets(): import("../../MapView.types").TPadding; /** * Animate the camera to focus on a collection of targets. To control where the targets should * be placed on screen, either specify `safeAreaInsets` on the {@link TFocusOnCameraOptions} * or call {@link setSafeAreaInsets}. * * ```ts * const location = mapView.venue.locations.find((l) => l.name === "My Location")!; * * mapView.Camera.focusOn({ * polygons: location.polygons, * nodes: location.nodes, * }); * ``` * * @param targets A collection of things that the camera will place into view at the end of the * animation. * @param options * @returns a Promise that resolves when the animation finishes, or rejects when it is cancelled. */ focusOn(targets: TCameraTargets, options?: TFocusOnCameraOptions & TCameraAnimationOptions): Promise; /** * Instantaneously set the camera's transform to be in a new configuration. See also {@link animate}. * * ```ts * const coord = mapView.venue.maps[0].createCoordinate(33.66107, 31.83911); * * // Place the camera top-down at a specified coordinate * mapView.Camera.set({ * tilt: 0, * position: coord, * }); * ``` * * @param transform The new transform of the camera. */ set(transform: TCameraTransform): void; /** * Convert a Mercator Zoom Level to altitude, which can be used in the Camera APIs */ convertZoomLevelToAltitude(zoomLevel: number): any; /** * Convert the altitude returned by getZoom into Mercator Zoom level */ convertAltitudeToZoomLevel(altitude: number): any; /** * Smoothly transition the camera's transform to be in a new configuration. See also {@link set}. * * ```ts * const coord = mapView.venue.maps[0].createCoordinate(33.66107, 31.83911); * * // Animate the camera to be top-down at a specified coordinate * mapView.Camera.animate({ * tilt: 0, * position: coord, * }); * ``` * * @param transform The new transform of the camera. * @param options * @returns a Promise that resolves when the animation finishes, or rejects when it is cancelled. */ animate(transform: TCameraTransform, options?: TCameraAnimationOptions): Promise; /** * Moves the Camera view in a relative direction by a given distance in meters. * * ```ts * // Move the camera 50 meters up relative to the camera frame * mapView.Camera.translate(E_CAMERA_DIRECTION.UP, 50); * ``` * * @returns a Promise that resolves when the translation animation finishes, or rejects when it is cancelled. */ translate(direction: E_CAMERA_DIRECTION, distance: number, options?: TCameraAnimationOptions): Promise; /** * Cancel the currently active Camera animation. */ cancelAnimation(): void; } } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/BlueDot' { import { MappedinMap } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/index.rn'; import { BlueDotController, TEnableBlueDotOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types'; /** * API to enable and respond to user position updates. */ export class BlueDot { #private; /** * @hidden */ constructor(controller: BlueDotController); /** * Subscribe a function to be called when an {@link E_BLUEDOT_EVENT} is fired. * * ```ts * const blueDotChangeHandler = ({ map, nearestNode, position, bearing }) => { * // Do something with the new values * }; * mapView.BlueDot.on(E_BLUEDOT_EVENT.POSITION_UPDATE, blueDotChangeHandler); * ``` * * @param eventName An {@link E_BLUEDOT_EVENT} that is fired when the blue dot changes. * @param fn A callback that gets called when the corresponding event is fired. The * callback will get passed an argument with a type that's one of {@link E_BLUEDOT_EVENT_PAYLOAD}. */ on: BlueDotController['on']; /** * Unsubscribe a function that was previously subscribed with {@link on}. * * ```ts * mapView.BlueDot.on(E_BLUEDOT_EVENT.POSITION_UPDATE, blueDotChangeHandler); * * ... * * // Something changed and I no longer want this event to fire * mapView.BlueDot.off(E_BLUEDOT_EVENT.POSITION_UPDATE, blueDotChangeHandler); * ``` * * @param eventName An {@link E_BLUEDOT_EVENT} that is fired when the blue dot changes. * @param fn A function that was previously passed to {@link on}. The function must * have the same reference as the function that was subscribed. */ off: BlueDotController['off']; /** * Enables Blue Dot. A blue dot will appear on the map that responds to the device's geolocation * updates. It then emits {@link TBlueDotStateChange} and {@link TBlueDotPositionUpdate} events * via {@link E_BLUEDOT_EVENT}. * * ```ts * // Enable blue dot * mapView.BlueDot.enable(); * * // Disable blue dot * mapView.BlueDot.disable(); * ``` * * @param options */ enable(options?: TEnableBlueDotOptions): void; enableTargetMapOverride(mapId: MappedinMap['id'], options?: { restoreWhenNewFloorLevelIsReceived: boolean; }): void; disableTargetMapOverride(): void; /** * Disables Blue Dot that was enabled with {@link enable} and stops emitting events. * * ```ts * // Enable blue dot * mapView.BlueDot.enable(); * * // Disable blue dot * mapView.BlueDot.disable(); * ``` */ disable(): void; /** * Updates the bearing (direction) of the blue dot on the map. * * @param v - The new bearing value in degrees. If undefined, the bearing will be reset. * 0 degrees points north, 90 degrees points east, and so on. */ updateBearing(v?: number): void; } } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Markers' { import { TAnimationOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { MappedinCoordinate, MappedinNode } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import { TCreateMarkerOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import MarkersController, { Marker } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/MarkersController'; /** * API to control adding 2D markers to the scene. */ export class Markers { #private; /** * @hidden */ constructor(markersController: MarkersController); /** * An array of {@link Marker} instances that currently exist. */ get markers(): Marker[]; /** * Create a new {@link Marker}, containing some HTML, at the specified position. * * ```ts * mapView.Markers.add(coordinate, ` *
* My Marker *
* `); * ``` * * @param nodeOrCoordinate The {@link MappedinNode} or {@link MappedinCoordinate} to * which the marker is pinned. * @param contentHtml Stringified HTML content to render inside the Marker. * @param options * @returns The {@link Marker} object that was created. */ add(nodeOrCoordinate: MappedinNode | MappedinCoordinate, contentHtml: string, options?: TCreateMarkerOptions): Marker; /** * Moves an existing {@link Marker} to a new position instantaneously. See * also {@link animate}. * * ```ts * const marker = mapView.Markers.add(...); * * // Move the marker to a new coordinate * mapView.Markers.setPosition(marker, newCoordinate); * ``` * * @param markerOrMarkerId The {@link Marker} to move. * @param target The {@link MappedinNode} or {@link MappedinCoordinate} to * which the marker should be moved. */ setPosition(markerOrMarkerId: Marker | Marker['id'], target: MappedinNode | MappedinCoordinate): void; /** * Moves an existing {@link Marker} to a new position smoothly over time. * * ```ts * const marker = mapView.Markers.add(...); * * // Animate the marker to a new coordinate over 500ms * mapView.Markers.animate(marker, newCoordinate, { * duration: 500 * }); * ``` * * @param markerOrMarkerId The {@link Marker} to move. * @param target The {@link MappedinNode} or {@link MappedinCoordinate} to * which the marker should be moved. * @param options */ animate(markerOrMarkerId: Marker | Marker['id'], target: MappedinCoordinate | MappedinNode, options?: TAnimationOptions): Promise; /** * Removes an existing {@link Marker}. * * ```ts * const marker = mapView.Markers.add(...); * * ... * * // The marker is no longer needed * mapView.Markers.remove(marker); * ``` * * @param markerOrMarkerId the {@link Marker} to be removed. */ remove(markerOrMarkerId: Marker | Marker['id']): void; /** * Remove all {@link Marker} instances from all maps. * * ```ts * mapView.Markers.removeAll(); * ``` */ removeAll(): void; } } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Paths' { import { MappedinCoordinate, MappedinNode } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import { TPathOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import PathsController, { Path } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/PathsController'; /** * API to add and remove paths from maps. See also {@link Journey}. */ export class Paths { #private; /** * @hidden */ constructor(pathsController: PathsController); /** * An array of all {@link Path} instances that are currently drawn. */ get paths(): Path[]; /** * Takes an array of {@link MappedinNode} instances and draws an {@link Path} with * path segments on each map corresponding to the nodes on that map. * * ```ts * const departure = mapView.venue.locations.find((l) => l.name === "Apple")!; * const destination = mapView.venue.locations.find((l) => l.name === "Cleo")!; * const directions = departure.directionsTo(destination); * * // Draw the above directions as a path on the map * mapView.Paths.add(directions.path); * ``` * * @param nodes A {@link MappedinNode} array, probably from a {@link MappedinDirections} instance. * @param options */ add(nodes: (MappedinNode | MappedinCoordinate)[], options?: TPathOptions): Path; /** * Remove a {@link Path} from all maps it exists on. * * ```ts * const path = mapView.Paths.add(nodes); * * ... * * // The path is no longer needed * mapView.Paths.remove(path); * ``` * * @param path The {@link Path} instance to be removed. */ remove(path: Path): void; /** * Remove all {@link Path} instances from all maps. */ removeAll(): void; } } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/StackedMaps' { import { MappedinMap } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import { TStackedMapsOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/MapView.types'; import { STACKED_MAPS_STATE, StackedMapsController, TCameraTransform, TCameraAnimationOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; /** * @experimental * API for showing multiple maps involved in a {@link Journey} as a vertical stack. */ export class StackedMaps { #private; /** * @hidden */ constructor(markersController: StackedMapsController); /** * @experimental * Enable Stacked Maps. If a {@link Journey} is drawn beforehand the default behaviour is to only display the floors that are part of the journey. * {@link TStackedMapsOptions} can be used to enabling display of all maps including those that are not part of the journey. * Use {@link showOverview} to expand the maps vertically after enabling. * * Upon enabling, map state will become {@link STATE.STACKED | STACKED} and Stacked Maps state will become {@link STACKED_MAPS_STATE.ACTIVE | ACTIVE}. * * @example * ```ts * // Create a Journey * const startLocation = mapView.venue.locations.find(...); * const endLocation = mapView.venue.locations.find(...); * mapView.Journey.draw(startLocation.directionsTo(endLocation)); * * // Enable and show Stacked Maps Overview * mapView.StackedMaps.enable({ * verticalDistanceBetweenMaps: 150 * }); * mapView.StackedMaps.showOverview(); * ``` * * @returns Promise when all animations are complete. */ enable: (opts?: TStackedMapsOptions) => Promise; /** * @experimental * * Disable Stacked Maps and zoom in to the current map. Stacked Maps state will become {@link STACKED_MAPS_STATE.INACTIVE | INACTIVE}. * * @example * ```ts * mapView.StackedMaps.disable(); * ``` * * @returns Promise when all animations are complete. */ disable: () => Promise; /** * @experimental * * Expand and display all maps in the current {@link MapGroup}. If a {@link Journey} has been drawn, vertical paths between connections are displayed. * Stacked Maps must be enabled beforehand and state will become {@link STACKED_MAPS_STATE.OVERVIEW | OVERVIEW}. * * @example * ```ts * mapView.Journey.draw(...) * mapView.StackedMaps.enable(); * mapView.StackedMaps.showOverview(); * ``` * * @returns Promise when all animations are complete. */ showOverview: (animationOptions?: TCameraAnimationOptions) => Promise; /** * @experimental * * Scroll the camera to a specific map in {@link STACKED_MAPS_STATE.OVERVIEW | OVERVIEW} state. * * @example * ```ts * // Scroll the camera to a specific map if Stacked Maps is in Overview state * mapView.on(E_SDK_EVENT.CLICK, ({ maps }) => { * if (maps.length <= 0) return; * if (mapView.StackedMaps.state === STACKED_MAPS_STATE.OVERVIEW) { * mapView.StackedMaps.scrollToMap(maps[0]); * } * }); * ``` * * @returns Promise when all animations are complete. */ scrollToMap: (map: MappedinMap, duration?: number) => Promise; /** * @experimental * * Scroll and zoom into a specific map in {@link STACKED_MAPS_STATE.OVERVIEW | OVERVIEW} state. Stacked Maps state will become {@link STACKED_MAPS_STATE.ZOOMED_IN | ZOOMED_IN}. * * @example * ```ts * // Zoom into a clicked map if Stacked Maps is in Overview state * mapView.on(E_SDK_EVENT.CLICK, ({ maps }) => { * if (maps.length <= 0) return; * if (mapView.StackedMaps.state === STACKED_MAPS_STATE.OVERVIEW) { * mapView.StackedMaps.zoomInToMap(maps[0]); * } * }); * ``` * * @returns Promise when all animations are complete. */ zoomInToMap: (map: MappedinMap, cameraOptions?: TCameraTransform & TCameraAnimationOptions) => Promise; /** * @experimental * * Used when in {@link STACKED_MAPS_STATE.OVERVIEW | OVERVIEW} state to replace the maps in the * current stack after clearing or creating a {@link Journey}. * Use this to hide maps that are not part of the journey or to display all maps in the {@link MapGroup}. * * @param options - Options to adjust the overview. Each option defaults to the setting passed in {@link enable}, unless provided. * * @example * ```ts * mapView.Journey.draw(...); * mapView.StackedMaps.enable(); * mapView.StackedMaps.showOverview(); * mapView.Journey.clear(); * mapView.StackedMaps.restack(); * ``` * * @returns Promise when all animations are complete. */ restack: (options?: TStackedMapsOptions) => Promise; /** * @experimental * * Get the current state of Stacked Maps. * * @returns The current {@link STACKED_MAPS_STATE} */ get state(): STACKED_MAPS_STATE; } } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/OutdoorView' { import { OutdoorViewController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; /** * @experimental * API to control outdoor view rendering. Outdoor view can be enabled when * initializing the {@link MapView} with `outdoorView: { enabled: true }` in {@link TMapViewOptions}. * @example * ```typescript * const mapView = await showVenue(document.getElementById('mappedin-map'), venue, { * multiBufferRendering: true, * outdoorView: { * enabled: true, * }, * }); * ``` */ export class OutdoorView { #private; /** * @private */ constructor(outdoorViewController: OutdoorViewController | undefined); /** * @experimental * @param style A style object conforming to the [Maplibre Style Spec](https://maplibre.org/maplibre-style-spec/) * @returns */ setStyle(style: any): void; /** * @experimental * A position definition for the attribution control to be placed, can be in one of the corners of the map. * * @param {string} style A position definition * @returns */ setAttributionPosition(position: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'): void; /** * Show the outdoor view. Outdoor view must first be enabled in {@link TMapViewOptions} during {@link showVenue}. * See also {@link hide}. */ show(): void; /** * Hide the outdoor view. Outdoor view must first be enabled in {@link TMapViewOptions} during {@link showVenue}. * See also {@link show}. */ hide(): void; } export default OutdoorView; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/DynamicFocus' { import { MappedinMap, MappedinMapGroup } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import { DynamicFocusSceneManager } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; /** * @experimental * API to dynamically set the map focus as you pan over map groups. Dynamic Focus can be enabled when * initializing the {@link MapView} with base map set in {@link TMapViewOptions} * @example * ```typescript * const mapView = await showVenue(document.getElementById('mappedin-map'), venue, { * dynamicFocus: { * baseMap: venue.maps[0], * }, * }); * ``` */ class DynamicFocus { #private; /** * @hidden */ constructor(dynamicFocusSceneManager: DynamicFocusSceneManager); /** * @experimental * Controls whether the map should be set when the user pans over to it. * * @example * ```ts * if (mapView.DynamicFocus) { * mapView.DynamicFocus.setMapOnUserInteraction = false; * } * ``` */ set setMapOnUserInteraction(value: boolean); /** * @experimental * Returns the current boolean value whether the map should be set when the user pans over it. * * @example * ```ts * if(mapView.DynamicFocus && mapView.DynamicFocus.setMapOnUserInteraction) { * mapView.DynamicFocus.setMapOnUserInteraction = false; * } * ``` */ get setMapOnUserInteraction(): boolean; /** * @experimental * Force Dynamic Focus to evaluate and set the current map based on camera position. * * @example * ```ts * // Animate the camera to focus on a building * await mapView.Camera.focusOn({ * polygons: venue.locations.find(l => l.name === 'Building')?.polygons, * }); * // Force Dynamic Focus update * mapView.DynamicFocus?.update(); * ``` */ update(): void; /** * Set the default map for a map group. This map will be set when the user pans over the map group. */ setDefaultMapForMapGroup(mapGroup: MappedinMapGroup, map: MappedinMap): void; /** * Reset the default map for a map group. This map will be set when the user pans over the map group. */ resetDefaultMapForMapGroup(mapGroup: MappedinMapGroup): void; } export { DynamicFocus }; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Layers' { import { Feature, FeatureCollection, GeoJsonProperties, Polygon } from 'geojson'; import { LayerController, MappedinMap } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; /** * @experimental * API to control per-map layer management, visibility and interpolations. */ export class Layers { #private; /** * @private */ constructor(layerController: LayerController | undefined); /** * @experimental * Returns a mapping of all layers for a map, and whether they are visible or not. */ getAllLayersForMap(map: MappedinMap): Promise; /** * @experimental * Re-renders the map only showing the layers specified in the array. This will discard any polygons that have been highlighted. */ showLayers(layers: string[]): void; /** * @experimental * Adds a GeoJSON Feature or FeatureCollection to the map as a layer. The layer name must be unique */ addGeoJSONLayer(layerName: string, featureOrFeatureCollection: Feature | FeatureCollection): Promise; /** * @experimental * Hides a GeoJSON layer from the map and removes it from the list of layers. * It will not appear in {@link getAllLayersForMap} afterwards and can be overwritten by a new layer with the same name. */ removeGeoJSONLayer(layerName: string): Promise; } export default LayerController; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/outdoor-context/Outdoor-Context.provider' { /** * @deprecated Use {@link OutdoorView} instead. * The universal outdoor context interface */ export interface IOutdoorContextProvider { /** * Returns the appropriate tile at coordinate */ fetchTile(tileX: number, tileY: number, zoom: number, signal: AbortSignal): Promise; /** * Fetch attribution for the current tiles * format: [SouthwestCorner_Longitude, SouthwestCorner_Latitude, NortheastCorner_Longitude, NortheastCorner_Latitude] */ fetchAttribution?(zoomLevel: number, bounds: [number, number, number, number]): Promise; } /** * @deprecated Use {@link OutdoorView} instead. * Azure maps outdoor context class */ export class AzureOutdoorContextProvider implements IOutdoorContextProvider { lang: string; apiKey?: string; token?: string; tileSize: number; tilesetId: string; constructor(lang?: string, tileSize?: 256 | 512, apiKey?: string, token?: string); makeURL(x: number, y: number, zoom: number): string; /** * Fetch attribution for the current tiles * format: [SouthwestCorner_Longitude, SouthwestCorner_Latitude, NortheastCorner_Longitude, NortheastCorner_Latitude] */ fetchAttribution(zoomLevel: number, bounds: [number, number, number, number]): Promise; /** * Returns the appropriate tile at coordinate */ fetchTile(tileX: number, tileY: number, zoom: number, signal: AbortSignal): Promise; } /** * @deprecated Use {@link OutdoorView} instead. * Google maps outdoor context class */ export class GoogleOutdoorContextProvider implements IOutdoorContextProvider { apiKey: string; sessionToken: string; lang: string; constructor(lang: string, apiKey: string); makeURL(x: number, y: number, zoom: number): string; /** * Returns the Google session token */ fetchSessionToken(): Promise; /** * Returns the appropriate tile at coordinate */ fetchTile(tileX: number, tileY: number, zoom: number, signal: any): Promise; } /** * @deprecated Use {@link OutdoorView} instead. * OpenStreetMap maps outdoor context class */ export class OpenStreetMapOutdoorContext implements IOutdoorContextProvider { makeURL(x: number, y: number, z: number, customServer?: string): string; /** * Returns the appropriate tile at coordinate */ fetchTile(tileX: number, tileY: number, zoom: number, signal: any, customServer?: string): Promise; } } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/controllers/PerformanceController' { import type Core from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/Core'; /** * Represents performance statistics. */ export interface PerformanceStats { fps: number; ms: number; mb: number; } export type FPSChangeHandler = (stats: PerformanceStats) => void; interface PerformanceControllerOptions { container: HTMLDivElement; dynamicPerformance: boolean; debug: boolean; onFPSChangeArray: FPSChangeHandler[]; } /** * Manages performance monitoring, updating stats, and handling FPS changes. * It executes callbacks from the onFPSChangeArray starting from the penultimate one in descending order * when the FPS drops below the minimum threshold * * @hidden * @internal * */ export class PerformanceController { /** * @hidden * @internal */ constructor(options: PerformanceControllerOptions); /** * @hidden * @internal */ static getDefaultOnFPSChangeArray(core: Core): (() => void)[]; /** * @hidden * @internal */ update(): void; /** * Gets the current performance statistics. * * @hidden * @internal * @returns {PerformanceStats} The current performance statistics. */ get currentStats(): PerformanceStats; /** * Gets the DOM element for the performance view. * * @hidden * @internal * @returns {HTMLDivElement} The DOM element. */ get dom(): HTMLDivElement; /** * Hides the debugger view. * * @hidden * @internal */ hidePerformancePanel(): void; /** * Shows the debugger view. * * @hidden * @internal */ showPerformancePanel(): void; } /** * Visual representation of performance stats. * * @hidden * @internal */ export class PerformanceView { constructor(debug: boolean, appContainer: HTMLDivElement, maxValues: PerformanceStats); createContainer(): HTMLDivElement; showPanel(id: number): void; hidePerformancePanel(): void; showPerformancePanel(): void; updatePanels(stats: PerformanceStats): void; /** * Gets the DOM element for the performance view. * @returns {HTMLDivElement} The DOM element. */ get dom(): HTMLDivElement; } export {}; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/quad-tree' { export function contains(rect1: Rectangle, rect2: Rectangle): boolean; export function intersects(rect1: Rectangle, rect2: Rectangle): boolean; export function intersectPoint(rect1: Rectangle, point: Point2D): boolean; export type Point2D = [number, number]; class Rectangle { x: number; y: number; w: number; h: number; userData: T; constructor(x: number, y: number, w: number, h: number, userData?: T); contains(rectangle: Rectangle): boolean; intersects(rectangle: Rectangle): boolean; intersectsPoint(point: Point2D): boolean; draw(context: CanvasRenderingContext2D): void; } class QuadTree { boundary: Rectangle; capacity: number; objects: Rectangle[]; topLeft: QuadTree; topRight: QuadTree; bottomLeft: QuadTree; bottomRight: QuadTree; divided: boolean; parent?: QuadTree; getSize(): any; constructor(boundary: Rectangle, parent?: QuadTree); subdivide(): void; queryRect(rectangle: Rectangle): Rectangle[]; queryPoint(point: Point2D): Rectangle[]; insert(rectangle: Rectangle): boolean; drawObjects(context: CanvasRenderingContext2D): void; draw(context: CanvasRenderingContext2D): void; } export { QuadTree, Rectangle }; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/private/scene-manager/dynamic-focus-scene-manager/dynamic-focus-utils' { import { MappedinMap } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import type { ICore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; export function determineMapPositionAndRotation(map: MappedinMap, core: ICore): { position: number[]; scale: number[]; rotation: number[]; }; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/utils/utils' { import { Box3, Vector3, Object3D } from 'three'; import { Mappedin, MapObject, MappedinMap, TMapViewOptions } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { Camera } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Camera'; /** * Utils function listing * * - scrubMaterial * - getObjectID * - getObject * - getBoundingBox * - getBiggestBoundingBox * - upackBoundingBox * - getMapScale * - throttle -> taken from lodash.js * - getProjectionScaleFactor * - getZoom */ export function isGatewayKey(key: string): boolean; export function getCombinedBoundingBox(objects: Object3D[]): Box3; export function getMapsBoundingBox(maps: MapObject[], mapPadding: number): Box3; export function scrubMaterial(material: any): void; /** * Takes a Mappedin Object or id and returns the ID, so our functions can take bottomRight * @template T extends string | {id: string} * @param {T} object - input can be object containing id or the id itself * @return {string} */ export function getObjectId(object: any): string; /** * Takes a Mappedin object or ID and the array to look in and retuns the Object, so our functions can take both */ export function getObject(obj: T, array: K[] | undefined): K | undefined; export function getBoundingBox(object: Object3D): Box3; /** * Function pushes the items of the second array onto the first array (inplace). * @template T * @param {Array.} arr1 - base array * @param {Array.} arr2 - array which items will be pushed to arr1 */ export function appendItems(arr1: T[], arr2: T[]): void; export function getBiggestBoundingBox(objects: Object3D[]): { min: Vector3; max: Vector3; }; export function unpackBoundingBox(boundingBox: Box3): Vector3[]; export function getMapScale(map: MappedinMap): number; export function getNorth(map: MappedinMap): number; export function flatten(list: any[]): any[]; export function uniq(arr: any[]): any[]; export function toStyleString(styles: Record): string; /** /* getProjectionScaleFactor() /* finds the scale ratio between screen coordinates and 3D coordinates (in X-Z plane) /* * R * /| * C : Camera / | * PQ : Projection Plane / | * OR : Origin / | * F : FOV / | * Q / | * /| | * / | | * / | | * / | | * / | | * / F/2 | | * C ------------P------------ O * * * ProjectionScaleFactor = ( OR / PQ ) * PQ = canvasHeight / 2 * CQ = zoom * * OR / C0 = tan(F/2) * so OR = CO * tan(F/2) */ export function getProjectionScaleFactor(FOV: number, canvasHeight: number, zoom: number): number; /** getZoom * * C - Camera, OP -- picture plane (canvas), S - origin, * QR - front side of maps Bounding Box, F: FOV * * Z-axis * R_____|______ * /| | | * / | | | * P/ | | | maps BB * /| | | | * / | | | | * / | | | | * / F |E |T |S | * C /--------|-----|-----|-----|------ orthogonal to Y axis, midpoint of focus maps * \ | | | | * \ | | | | * \ | | | | * \ | | | | * \| | | | * O\ | | | * \ | | | * \|_____|_____| * Q * * * We want to get CS, which is the camera zoom * */ export function getZoom(focusBox: Box3, focusBoxHeight: number, FOV: number): number; interface CalculateTwoDProjectionsParams { maps: MapObject[]; width: number; height: number; camera: Camera; } export function calculateTwoDProjections({ maps, width, height, camera }: CalculateTwoDProjectionsParams): { min: { x: number; y: number; }; max: { x: number; y: number; }; }[]; export function splitLine(startNode: Vector3, endNode: Vector3, segments: number): Vector3[]; export function isObject(item: any): boolean; export const determineStartingMap: (venue: Mappedin, options: TMapViewOptions) => MappedinMap; export function cyrb53(str: string, seed?: number): number; export function addMarginMultiplierToBoundingBox(bbox: Box3, multiplier: number): Box3; export function tweenPromise({ from, to, duration, easing, delay, onUpdate, onStart, onComplete, }: { from: any; to: any; duration?: number; easing?: any; delay?: number; onUpdate?: (_: any) => void; onStart?: () => void; onComplete?: () => void; }): { start(core: any): Promise; }; export const linearEase: (t: number) => number; export const quadEaseIn: (t: number) => number; export const quadEaseOut: (t: number) => number; export function interpolate(value: number, inputMin: number, inputMax: number, outputMin: number, outputMax: number, easeFunc?: (t: number) => number): number; export function interpolateMulti(value: number, inputRange: number[], outputRange: number[], easeFunc?: (t: number) => number): number; export function checkWritableBeforeWrite(obj: any, key: string, value: any): void; export {}; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/utils/browser' { type DeviceType = { isIpad: boolean; isMobile: boolean; isSafari12: boolean; isFirefox: boolean; isWindows: boolean; }; /** * Get device OS info * export for testing purpose * @returns DeviceType */ export const _deviceTypeControl: { getDeviceType(): DeviceType; _reset(): void; }; export const getDeviceType: () => DeviceType; /** * Creates a closure encapsulating the logic of getting device GPU info. * inspired by https://github.com/pmndrs/detect-gpu * export for testing */ export const _gpuInfoControl: { getInfo: () => string; shouldDisableOffscreenCanvas: () => boolean; _setCanvas(c: HTMLCanvasElement): void; }; export const getGPUInfo: () => string; /** * Check if device is certain intel integrated GPU. * This is for implementing workaround - https://issues.chromium.org/issues/40251953 * The reason we want to disable OffscreenCanvas at all is due to `willReadFrequently` flag only works in FF. * In order to ensure the integrated intel GPU render text correctly */ export const shouldDisableOffscreenCanvas: () => boolean; export {}; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/utils/async' { export function throttle(func: () => void, wait: number, options?: any): () => void; export function debounce(func: () => void, wait: number, immediate?: boolean): () => void; } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/public/api/Exporter' { import { ExportController } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; /** * @hidden */ export type TGLTFExportOptions = { onlyVisible?: boolean; binary?: boolean; scale?: number; light?: boolean; }; /** * API to export the scene. * * @hidden */ export class Exporter { #private; /** * @hidden * @internal */ constructor(controller: ExportController); /** * Exports the current scene as a GLTF file. * * @hidden */ getCurrentSceneGLTF(userOptions: TGLTFExportOptions): Promise; } } declare module '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/outdoor-context/Mappedin.Tile' { import { Texture, Mesh, MeshBasicMaterial } from 'three'; import type { ICore } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal'; import { MappedinCoordinate, MappedinMap } from '@mappedin/react-native-sdk/sdks/packages/get-venue'; import { TileManager } from '@mappedin/react-native-sdk/sdks/packages/legacy-renderer/internal/outdoor-context/Mappedin.TileManager'; export class Tile { #private; center: MappedinCoordinate; zoomLevel: number; mesh: Mesh; material?: MeshBasicMaterial; texture?: Texture; cache: { tileXY?: { tileX: number; tileY: number; }; tileBoundingBoxInLatLon?: number[]; }; get tileXY(): { tileX: number; tileY: number; }; get tileBoundingBoxInLatLon(): number[]; constructor(center: MappedinCoordinate, zoomLevel: number, tileManager: TileManager, core: ICore, currentAbortController: AbortController); rendered: boolean; discardTexture(): void; applyTexture(): void; render(metersPerTile: number, referenceMap: MappedinMap): Mesh, import("three").Material | import("three").Material[], import("three").Object3DEventMap>; } }