new MapboxTooltipInteraction(map, options)
MapboxViewer/infrastructure/adapters/interactions/MapboxTooltipInteraction.ts, line 6
Creates a new MapboxTooltipInteraction instance.
| Name | Type | Description |
|---|---|---|
map |
The Mapbox map instance. |
|
options |
Configuration options for the tooltip interaction. |
Methods
-
disable()
MapboxViewer/infrastructure/adapters/interactions/MapboxTooltipInteraction.ts, line 53 -
Disables the tooltip interaction.
-
enable()
MapboxViewer/infrastructure/adapters/interactions/MapboxTooltipInteraction.ts, line 43 -
Enables the tooltip interaction.
-
formatLabel(key)
MapboxViewer/infrastructure/adapters/interactions/MapboxTooltipInteraction.ts, line 196 -
Formats a property key into a human-readable label.
Name Type Description keyProperty key.
Returns:
Formatted label. -
formatTooltipContent(properties, propKeys)
MapboxViewer/infrastructure/adapters/interactions/MapboxTooltipInteraction.ts, line 177 -
Formats tooltip content with structured HTML.
Name Type Description propertiesFeature properties to display.
propKeysProperty keys to include.
Returns:
Formatted HTML string. -
formatValue(value)
MapboxViewer/infrastructure/adapters/interactions/MapboxTooltipInteraction.ts, line 205 -
Formats a property value for display.
Name Type Description valueProperty value.
Returns:
Formatted string representation. -
handleClick(e)
MapboxViewer/infrastructure/adapters/interactions/MapboxTooltipInteraction.ts, line 78 -
Handles click events to display tooltip with feature information.
Name Type Description eThe map click event.
-
hidePopup()
MapboxViewer/infrastructure/adapters/interactions/MapboxTooltipInteraction.ts, line 165 -
Hides the popup.
-
setOptions(options)
MapboxViewer/infrastructure/adapters/interactions/MapboxTooltipInteraction.ts, line 67 -
Updates the interaction options.
Name Type Description optionsNew options to apply.
