Sets a highlight, animates it over the given duration, and then removes it again.
The Feature or Geometry which should be highlighted. The given Feature itself will not be manipulated, but a matching geometry will be created and inserted in the highlight overlay.
The style of the highlight. If an InterpolatableStyle is given, the style will be interpolated over the given time, using the given easing.
Time in milliseconds for the animation, before the feature is removed again.
The function will be called with values from 0 to 1, and is expected to return eased values in the range 0..1. For this method, the easing should typically ease from 0 to 1 and back down to 0 (such as ballistic, the default) to make the feature fade in and out.
Moves from 0 to 1 and back to 0 in a parabolic curve. The inverse of parabolic. This is strictly speaking not an "easing" since it doesn't ease from 0 to 1, but it is useful for temporary highlights.
An Observable emitting numbers from 0 to 1, as per tween. Typically, you will not need to handle the return value, but it can be used to track and synchronize to the animation.
Sets a highlight and animates it over the given time.
The Feature or Geometry which should be highlighted. The given Feature itself will not be manipulated, but a matching geometry will be created and inserted in the highlight overlay.
The style of the highlight. If an InterpolatableStyle is given, the style will be interpolated over the given time, using the given easing.
Time in milliseconds for the animation.
The function will be called with values from 0 to 1, and is expected to return eased values in the range 0..1. (A function like easeOut can make the feature appear smoothly).
An Observable emitting numbers from 0 to 1, as per tween. Typically, you will not need to handle the return value, but it can be used to track and synchronize to the animation.
Removes the highlight representing a previously given Feature or Geometry. If the highlight was created with an InterpolatableStyle, the interpolation will be run in reverse before the highlight is removed.
This can be either the originally given Feature, or a Feature from the highlight layer.
By default, the animation will run over the same time it did when created, but this can be overriden with this parameter.
Removes the exclusive highlight, if any. Behaves as remove
Sets the Map which contains this highlight layer.
This class maintains a vector layer to use for various highlight and overlays.