ExperimentalOptionaloptions: TAddLabelOptionsOptional additional options for the labels, similar to those in the add method (see TAddLabelOptions).
An array of all created Label instances.
EXPERIMENTAL FEATURE UNDER CONSTRUCTION
This is an experimental feature that may undergo significant changes, including breaking changes, renaming, or complete removal in future versions. Do not rely on this API in production environments.
Automatically adds all the labels (Label) to the map.
The text, appearance, priority, etc. of the labels will be automatically determined based on the external data from the map.
Adds a label (Label) to the map.
The target object (IAnchorable) where the label should be added (e.g., Space, Door, Coordinate, or Node).
The text content of the label.
Optionaloptions: TAddLabelOptionsOptional additional options for the label (see TAddLabelOptions).
The created label, or undefined if creation failed.
Labels in Mappedin JS
Labels are text elements anchored to map objects that automatically rotate, show/hide based on priority and zoom level, and manage collisions with other labels. They're perfect for displaying location names, points of interest, and contextual information.
Features
Example Usage
Advanced
appearanceto customize colors, fonts, and backgrounds.rankto control collision priority ('low', 'medium', 'high', 'always-visible').__EXPERIMENTAL__all()to automatically add labels for all map objects with predefined text (experimental feature).More Information
This class is accessed using MapView.Labels.