Class: Hover

Hover

Interaction qui permet de lever un event lorsque l'on passe sur une feature


new Hover(options)

Parameters:
Name Type Description
options olx.interaction.HoverOptions
Properties
Name Type Description
cursor string | undefined

css cursor a appliquer lorsque l'on survole une feature

featureFilter function | undefined

fonction filtre avec deux arguments, la feature et son layer . Return true pour valider le hover de la feature

hitTolerance number | undefined

Hit-detection tolerance en pixels.

handleCancelHover function | undefined

fonction a appeler pour empecher globalement le survol

handleCancelPropagation function | undefined

fonction a appeler pour empêcher la propagation des events apres cette interactions

Source:
Fires:
  • hover, hover-enter, hover-leave (directement sur le viewer)

Extends

  • ol_interaction_Interaction

Methods


handleMove_(e)

Get features whenmove

.

Get features whenmove

Parameters:
Name Type Description
e ol.event

"move" event

Source:

setActive(b)

Activate / deactivate interaction

.

Activate / deactivate interaction

Parameters:
Name Type Description
b boolean
Source:

setCursor(cursor)

Set cursor on hover

.

Set cursor on hover

Parameters:
Name Type Description
cursor string

css cursor propertie or a function that gets a feature, default: none

Source:

setFeatureFilter(filter)

Feature filter to get only one feature

.

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

Source:

setMap(map)

Remove the interaction from its current map, if any, and attach it to a new map, if any.

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.

Source: