Tooltip Control

Tooltip control shows the value (and the direction for vector datasets) at current mouse position on hovering the raster layer

Example

Tooltip Control

Constructor

TooltipControl(config: TooltipConfig = {})

Config Properties

unitFormat

Type: UnitFormat, required

Unit definition to be used for formatting.

directionType

Type: DirectionType, optional

Default value: INWARD

Direction type to be used for formatting.

directionFormat

Type: DirectionFormat, optional

Default value: VALUE

Direction format to be used for formatting.

followCursor

Type: boolean, optional

Default value: false

Follow the mouse cursor position.

followCursorOffset

Type: number, optional

Default value: 16

Offset from the mouse cursor position.

followCursorPlacement

Type: Placement, optional

Default value: BOTTOM

Placement from the mouse cursor position.

Methods

See Control for common Control methods.

update(rasterPointProperties: RasterPointProperties | undefined): void

Updates the tooltip displayed with the given rasterPointProperties or hides the tooltip.

updatePickingInfo(pickingInfo: PickingInfo & { raster?: RasterPointProperties }): void

Updates the tooltip displayed with the given pickingInfo or hides the tooltip.

Last updated