Home > @magiclane/maps-sdk > GemView > highlightHoveredMapLabel
GemView.highlightHoveredMapLabel() method
Highlight the hovered map label under the given screen coordinates.
To turn off the hover highlight, call this function with a (0, 0) screen position.
A recommended usage is to call highlightHoveredMapLabel(..., selectMapObject = false) to check if a label is hovered (and possibly update the tracking device cursor shape, etc.), and if the cursor position is stationary for a reasonable time period (e.g., 500 ms), call highlightHoveredMapLabel(..., selectMapObject = true) to retrieve the hovered map object data.
Signature:
highlightHoveredMapLabel(screenPosition: Point, input?: {
selectMapObject?: boolean;
}): GemError;Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
screenPosition |
The hovered screen point. | |
|
{ selectMapObject } |
(not declared) |
(Optional) |
|
input |
{ selectMapObject?: boolean; } |
(Optional) |
Returns:
GemError
{GemError} GemError.success if successful, GemError.notFound if no label was found, GemError.activation if the map is invalid, GemError.noMemory if memory could not be allocated for the highlighted object, GemError.inUse if another operation is in progress, or another GemError code if an error occurs.
Exceptions
An exception if the operation fails.