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 | The hovered screen point | |
{ selectMapObject } | (not declared) | (Optional) |
input | { selectMapObject?: boolean; } | (Optional) |
Returns:
GemError
GemError.successif successful -GemError.notFoundif no label was found -GemError.activationif the map is invalid -GemError.noMemoryif memory could not be allocated for the highlighted object -GemError.inUseif another operation is in progress - OtherGemErrorcodes if other errors occur
Exceptions
An exception if the operation fails