A non-interactive text label for grouping menu items into sections.
menu.addItem(new ContextMenuLabel({ text: "Navigation" }));menu.addItem(new ContextMenuItem({ label: "Center map here" }));menu.addItem(new ContextMenuItem({ label: "Zoom in" })); Copy
menu.addItem(new ContextMenuLabel({ text: "Navigation" }));menu.addItem(new ContextMenuItem({ label: "Center map here" }));menu.addItem(new ContextMenuItem({ label: "Zoom in" }));
Creates a new label.
Configuration options for the label.
Configuration options for creating a context menu label.
Optional
Custom CSS class name for the label element.
The text to display.
Gets the text of the label.
Sets the text of the label.
Removes the label from the DOM.
The label instance for method chaining.
A non-interactive text label for grouping menu items into sections.
Example