new Hover(options)
Interaction hover do to something when hovering a feature
Parameters:
Name | Type | Description |
---|---|---|
options |
olx.interaction.HoverOptions | cursor { string | undefined } css cursor propertie or a function that gets a feature, default: none
|
Fires:
- hover, enter,event: leave
Extends
- ol.interaction.Interaction
Methods
-
handleMove_(e)
-
Get features whenmove
Parameters:
Name Type Description e
ol.event "move" event
-
setCursor(cursor)
-
Set cursor on hover
Parameters:
Name Type Description cursor
string css cursor propertie or a function that gets a feature, default: none
-
setFeatureFilter(filter)
-
Feature filter to get only one feature
Parameters:
Name Type Description filter
function a function with two arguments, the feature and the layer of the feature. Return true to select the feature
-
setLayerFilter(filter)
-
Feature filter to get only one feature
Parameters:
Name Type Description filter
function a function with one argument, the layer to test. Return true to test the layer
-
setMap(map)
-
Remove the interaction from its current map, if any, and attach it to a new map, if any. Pass
null
to just remove the interaction from the current map.Parameters:
Name Type Description map
ol.Map Map.