Home > @magiclane/maps-sdk > GemMap > highlightHoveredMapLabel

GemMap.highlightHoveredMapLabel() method

Highlight the hovered map label under the given screen coordinates.

To turn off the hover highlight call the function with (0, 0) screen position

A recommended implementation is to call highlightHoveredMapLabel(..., selectMapObjects = false) to check if a label is hovered (and eventually update tracking device cursor shape etc) and if the cursor position is stationary for a reasonable time period (e.g. 500 ms) call highlightHoveredMapLabel(..., selectMapObjects = true) to retrieve the hovered map object data

Signature:

highlightHoveredMapLabel(screenPosition: Point, input?: {
        selectMapObject?: boolean;
    }): GemError;

Parameters

Parameter

Type

Description

screenPosition

Point

The hovered screen point

{ selectMapObject }

(not declared)

(Optional)

input

{ selectMapObject?: boolean; }

(Optional)

Returns:

GemError

Exceptions

An exception if the operation fails