Adds a label (Label) to the map.
The target object (Space, Door, or Coordinate) where the label should be added.
The text of the label.
Optional
Optional additional options for the label.
The created label, or undefined if creation failed.
map.Labels.add(space, 'Welcome', { appearance: { color: 'blue' } }); Copy
map.Labels.add(space, 'Welcome', { appearance: { color: 'blue' } });
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.
// Add all the labels to the mapmap.Labels.all(); Copy
// Add all the labels to the mapmap.Labels.all();
Removes a label (Label) from the map.
The label which should be removed.
mapView.Labels.remove(space); Copy
mapView.Labels.remove(space);
Removes all the labels (Label) from the map.
map.Labels.removeAll(); Copy
map.Labels.removeAll();
Adds a label (Label) to the map.