Search API for MapData
// Enable search
const mapData = await getMapData({ search: { enabled: true } });
// or
await mapData.Search.enable();
// Perform a search query
const results = await mapData.Search.query('Coffee Shop');
console.log(results.locations);
// Get search suggestions
const suggestions = await mapData.Search.suggest('Coff');
console.log(suggestions);
The approximate center coordinate (Coordinate) of the map.
The center coordinate of the map.
The name of the map.
The name of the map.
The organization ID of the map.
The organization ID of the map.
The token is used to fetch outdoor tiles.
The outdoor view token.
Changes the language of the map data.
The ISO 639-1 language code to change to (e.g., 'en' for English, 'fr' for French). Check (EnterpriseVenue.languages) for available languages
A promise that resolves when the language change is complete.
Retrieves a specific map feature by its type and ID.
The type of the element to retrieve (e.g., 'space', 'object').
The ID of the element.
The feature with the given type and ID, or undefined
if it does not exist.
Retrieves all map elements of a specific type.
The type of elements to retrieve (e.g., 'space', 'object').
An array of elements of the given type.
The spaces (Space) on the map.
The doors (Door) on the map.
The floors (Floor) on the map.
The stacks of floors (FloorStack) within the map.
The connections (Connection) on the map.
The objects (MapObject) on the map.
The points of interest (PointOfInterest) on the map.
The annotations (Annotation) on the map.
The nodes (Node) on the map.
The enterprise locations (EnterpriseLocation) on the map.
The enterprise categories (EnterpriseCategory) on the map.
The enterprise venue (EnterpriseVenue) on the map.
Retrieves directions (Directions) from one navigable point (TNavigationTarget) to another on the map.
The starting point for navigation.
The destination point.
Optional
options: TGetDirectionsOptionsOptional parameters for getting directions.
Directions from the start to the destination point.
Retrieves directions (Directions) from one navigable point (TNavigationTarget) to multiple destination points on the map.
The starting point for navigation.
The destination points.
Optional
options: TGetDirectionsOptionsOptional parameters for getting directions.
Directions from the start to the destination points.
Retrieves the distance between two navigable points (TNavigationTarget) on the map.
The starting point.
The destination point.
The distance between the start and destination points in meters.
Get the current environment.
Unsubscribe a function previously subscribed with on
An event name to which the provided function was previously subscribed.
A function that was previously passed to on. The function must have the same reference as the function that was subscribed.
Subscribe a function to an event.
An event name which, when fired, will call the provided function.
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.
Optional
download
Represents the data for a map, providing access to map elements like spaces, floors, and points of interest.