Module: ol/interaction/Translate

ol/interaction/Translate


Classes

TranslateEvent
Translate

Type Definitions

FilterFunction()

A function that takes an Feature or RenderFeature and an Layer and returns true if the feature may be translated or false otherwise.

Options{Object}

Properties:
Name Type Argument Default Description
condition Condition <optional>

A function that takes an MapBrowserEvent and returns a boolean to indicate whether that event should be handled. Default is always.

features Collection<Feature> <optional>

Features contained in this collection will be able to be translated together.

layers Array<Layer> | function <optional>

A list of layers from which features should be translated. Alternatively, a filter function can be provided. The function will be called for each layer in the map and should return true for layers that you want to be translatable. If the option is absent, all visible layers will be considered translatable. Not used if features is provided.

filter FilterFunction <optional>

A function that takes an Feature and an Layer and returns true if the feature may be translated or false otherwise. Not used if features is provided.

hitTolerance number <optional>
0

Hit-detection tolerance. Pixels inside the radius around the given position will be checked for features.