Stop fetching and sending realtime positions to the viewer, and clear the previous positions in the viewer.
Clears the trajectory from the viewer.
This function sends a "map.show_trajectory" event to the viewer with an empty data array and a status of "STOP". This will stop the trajectory animation and clear the trajectory from the map.
Deselects the currently selected poi.
This function sends a message to the viewer to deselect the currently selected poi. It does not take any parameters.
Deselects the currently selected poi categories.
This function sends a message to the viewer to deselect the currently selected poi categories. It does not take any parameters.
Sets the options for the directions feature of the viewer.
This function sends a message to the viewer to set the options for the directions feature. It does not return any value.
The options to set. The options object should contain the following properties:
Loads and displays the real-time positions of devices in the Situm dashboard.
The positions are updated every refreshRateMs milliseconds.
The options for loading the real-time positions.
OptionalcustomizeFeatures?: (position: RTDataCustomizer) => RTDataCustomizerA function that customizes the appearance of the real-time positions on the map. The function is called with the base data of the position as an argument, and should return the customized data or undefined if the position should not be rendered.
The filter for the real-time positions. Currently only supports filtering by building ID.
OptionalrefreshRateMs?: numberThe refresh rate for the real-time positions in milliseconds. Defaults to 10000.
Loads and displays the trajectory of a user in the Situm dashboard. The trajectory is displayed on the map as a line, with the user's position updated every second.
The options for loading the trajectory.
The ID of the building the user is in.
The start date of the trajectory.
The end date of the trajectory.
OptionaluserId?: stringThe ID of the user. If not provided, the trajectory of all users will be displayed.
Attaches a callback to a viewer event. The callback will be called when the viewer sends a message with the type matching the event parameter.
The type of the event to listen to.
The callback to call when the event is triggered.
Opens the location picker in the viewer.
This function sends a message to the viewer to open the location picker. It does not return any value.
The options to open the location picker. The options object should contain the following properties:
Selects a building by its identifier.
This function sends a message to the viewer to select the building with the given identifier. It does not return any value.
The identifier of the building to select.
Selects the saved find my car POI.
Selects a floor by its identifier and building identifier.
This function sends a message to the viewer to select the floor with the given identifier and building identifier. It does not return any value.
The identifier of the floor to select.
Selects a poi by its identifier.
The identifier of the poi to select.
Selects multiple POI categories by their identifiers.
This function sends a message to the viewer to select the POI categories with the given identifiers. It does not return any value.
Sends a "app.set_auth" event to the viewer with the given jwt string.
This function can be used to set the authentication token in the viewer.
The jwt string to set as the authentication token.
Sets the camera of the viewer.
This function sends a message to the viewer to set the camera. It does not return any value.
The options to set the camera. The options object should contain the following properties:
Sends a "app.set_config_item" event to the viewer with the given key and value.
This function can be used to set configuration items in the viewer, such as the language or the units.
The key of the configuration item to set.
The value of the configuration item to set.
Sets whether the camera should follow the user in the viewer.
If set to true, the camera will move to the user's position when the user moves. If set to false, the camera will stay in its current position.
Whether the camera should follow the user.
Sets the UI mode of the viewer.
This function sends a message to the viewer to set the UI mode. It does not return any value.
The options to set the UI mode. The options object should contain the following properties:
Sets the user's location on the map.
This function sends a message to the viewer to update the user's location on the map. The location is specified by the options object which should contain the following properties:
Calculates a static route between two points.
This function sends a message to the viewer to start the directions feature. It does not return any value.
The options to start the directions feature. The options object should contain the following properties:
Copyright (c) Situm Technologies. and its affiliates.
This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.