Skip to Content
APIMapInterface: MapConfig

Interface: MapConfig

Basic configuration for the map. Provides essential settings for initializing and customizing map behavior.

Example

const mapConfig: MapConfig = { zoom: 15, center: { lat: 40.7128, lng: -74.006 }, parentPlaceId: "building-1", onMapReady: () => console.log("Map is ready!"), enableHover: true, showCompass: true, }

Properties

authToken?

optional authToken: string;

(Optional) Authentication token for accessing protected map resources. Required for loading map related data from Portal.


bearing?

optional bearing: number;

(Optional) Initial bearing (rotation) of the map in degrees, clockwise from north.


bearingSnap?

optional bearingSnap: number;

(Optional) The bearing snap threshold in degrees.


center

center: LatLng

The initial center coordinates of the map.


doubleClickZoom?

optional doubleClickZoom: boolean;

(Optional) Whether double-click/double-tap zooms the map.


dragPan?

optional dragPan: boolean;

(Optional) Whether the user can pan by dragging/swiping.


enableHover?

optional enableHover: boolean;

(Optional) Whether to enable hover interactions on the map.


institutionId?

optional institutionId: string;

(Optional) The institution identifier for map context. Required for loading map related data from Portal.


interactive?

optional interactive: boolean;

(Optional) Master switch for all user interaction (pan/zoom/rotate).


keyboard?

optional keyboard: boolean;

(Optional) Whether keyboard shortcuts can pan/zoom/rotate the map.


lang?

optional lang: string;

(Optional) Language code for map labels and UI.


maxBounds?

optional maxBounds: LatLng[];

(Optional) Array of coordinates defining the maximum bounds of the map.


maxZoom?

optional maxZoom: number;

(Optional) Maximum allowed zoom level.


minZoom?

optional minZoom: number;

(Optional) Minimum allowed zoom level.


optional navigationPosition: "top-left" | "top-right" | "bottom-left" | "bottom-right";

(Optional) Position of the navigation controls on the map.


onFloorChange()?

optional onFloorChange: (newFloorId) => void;

(Optional) Callback invoked when the floor changes. Receives the new floor ID.

Parameters

newFloorId

string

Returns

void


onMapReady()?

optional onMapReady: () => void;

(Optional) Callback invoked when the map is ready.

Returns

void


onParentPlaceChange()?

optional onParentPlaceChange: (newParentPlaceId) => void;

(Optional) Callback invoked when the parent place changes. Receives the new parent place ID.

Parameters

newParentPlaceId

string

Returns

void


onRotate()?

optional onRotate: (degrees) => void;

(Optional) Callback invoked when the map is rotated. Receives the rotation in degrees.

Parameters

degrees

number

Returns

void


onZoomEnd()?

optional onZoomEnd: (zoomLvl?) => void;

(Optional) Callback invoked when the zoom operation ends. Receives the new zoom level.

Parameters

zoomLvl?

number

Returns

void


otherPotentialParentPlacesIds?

optional otherPotentialParentPlacesIds: string[];

(Optional) List of alternative parent place IDs.


parentPlaceId?

optional parentPlaceId: string;

(Optional) The ID of the parent place to display.


pitch?

optional pitch: number;

(Optional) The pitch (tilt) of the map in degrees.


rotateEnabled?

optional rotateEnabled: boolean;

(Optional) Whether the user can rotate the map; keeps pinch-zoom when disabled.


scrollZoom?

optional scrollZoom: boolean;

(Optional) Whether the scroll wheel/trackpad can zoom the map.


showCompass?

optional showCompass: boolean;

(Optional) Whether to display the compass control.


showZoom?

optional showZoom: boolean;

(Optional) Whether to display the zoom control.


tileCache?

optional tileCache: MapTileCacheConfig;

Tile cache configuration options Controls how map tiles are cached in memory and persisted

See

MapTileCacheConfig for available options


touchZoomRotate?

optional touchZoomRotate: boolean;

(Optional) Whether pinch gestures can zoom the map on touch devices.


zoom

zoom: number

The initial zoom level of the map.

Last updated on