Module: ol/interaction/Translate

ol/interaction/Translate


Classes

TranslateEvent
Translate

Members

TranslateEventType{string}

Properties:
Name Type Default Description
TRANSLATESTART string translatestart
TRANSLATING string translating
TRANSLATEEND string translateend

Type Definitions

FilterFunction()

interaction/Translate.js, line 37

A function that takes an module:ol/Feature or module:ol/render/Feature and an module:ol/layer/Layer and returns true if the feature may be translated or false otherwise.

Options{Object}

Properties:
Name Type Argument Default Description
features module:ol/Collection~Collection.<module:ol/Feature~Feature> <optional>

Only features contained in this collection will be able to be translated. If not specified, all features on the map will be able to be translated.

layers Array.<module:ol/layer/Layer~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.

filter module:ol/interaction/Translate~FilterFunction <optional>

A function that takes an module:ol/Feature and an module:ol/layer/Layer and returns true if the feature may be translated or false otherwise.

hitTolerance number <optional>
0

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