Skip to content

Function: selectEntity()

ts
function selectEntity(entityId, options?): Promise<void>;

Select (highlight) an entity on the map, optionally controlling the camera and floor behaviour of the selection.

Parameters

ParameterTypeDescription
entityIdMapstedIdThe entity's ID. Required; must be a string or number.
options?SelectOptionsOptional SelectOptions. Recognised fields are mapped to the iframe's custom-options payload: zoomTo (custom zoom level), buildingId (scope the selection), actionType (routing integration), changeFloor (when false, do not switch to the entity's floor), and panTo (when false, do not recentre the camera). Unset fields are omitted.

Returns

Promise<void>

a promise that resolves once the selection request is sent.

Throws

MAPSTED-1012 when entityId is null / undefined.

Throws

MAPSTED-1013 when entityId is not a string or number.

Throws

MAPSTED-1090 when the API is not READY.