createCustomTooltip

open override fun createCustomTooltip(    coordinate: MPIMap.MPICoordinate,     contentHtml: String,     selector: String,     options: MPIOptions.Tooltip,     callback: (id: String?) -> Unit?)

Create a tooltip with no default styling that the MapView will attempt to position in 3D space. The tooltip will be anchored to a specified node or coordinate in one of eight anchor orientations.

Unlike createTooltip, a custom tooltip is rendered without any additional wrappers, leaving styling entirely up to the external developer. The top-most element will be injected with a class in the form of .tooltip--anchor-{type} that indicates the current anchor type.

Return

Unit

Parameters

coordinate

The MPIMap.MPICoordinate on which the tooltip will be displayed. Represents the target of the tooltip.

contentHtml

The HTML content to be displayed within the tooltip. Allows for rich formatted text and images.

selector

A CSS selector string that allows the SDK to target the tooltip. This is required because we do not inject any default styling.

options

Configuration options for the tooltip, defined by MPIOptions.Tooltip.

callback

A callback function that is called after the tooltip is created. It receives the tooltip's ID as a parameter, which can be used for further reference. If the tooltip could not be created, null is passed to the callback.


open override fun createCustomTooltip(    node: MPINavigatable.MPINode,     contentHtml: String,     selector: String,     options: MPIOptions.Tooltip,     callback: (id: String?) -> Unit?)

Create a tooltip with no default styling that the MapView will attempt to position in 3D space. The tooltip will be anchored to a specified node or coordinate in one of eight anchor orientations.

Unlike createTooltip, a custom tooltip is rendered without any additional wrappers, leaving styling entirely up to the external developer. The top-most element will be injected with a class in the form of .tooltip--anchor-{type} that indicates the current anchor type.

Return

Unit

Parameters

node

The MPINavigatable.MPINode on which the tooltip will be displayed. Represents the target of the tooltip.

contentHtml

The HTML content to be displayed within the tooltip. Allows for rich formatted text and images.

selector

A CSS selector string that allows the SDK to target the tooltip. This is required because we do not inject any default styling.

options

Configuration options for the tooltip, defined by MPIOptions.Tooltip.

callback

A callback function that is called after the tooltip is created. It receives the tooltip's ID as a parameter, which can be used for further reference. If the tooltip could not be created, null is passed to the callback.