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)
in order 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
Parameters
** IN** screenPosition The hovered screen point ** IN** selectMapObject If true and a label is hovered, map objects attached to label are returned via IMapViewListener.onHoveredMapLabelHighlighted If false, no call to onHoveredMapLabelHighlighted is issued.
** Returns**
- 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
- GemError if other error codes are returned
Throws
- An exception if it fails.
Implementation
GemError highlightHoveredMapLabel(
final Point<int> screenPosition, {
final bool selectMapObject = false,
}) {
final OperationResult resultString = objectMethod(
_pointerId,
'MapView',
'highlightHoveredMapLabel',
args: <String, Object>{
'pt': XyType<int>.fromPoint(screenPosition),
'selectMapObjects': selectMapObject,
},
);
return GemErrorExtension.fromCode(resultString['result']);
}