Classes
Type Definitions
-
A function that takes a
Feature
orRenderFeature
and aLayer
and returnstrue
if the feature may be translated orfalse
otherwise. -
Options{Object}
-
Properties:
Name Type Description condition
Condition | undefined A function that takes a
MapBrowserEvent
and returns a boolean to indicate whether that event should be handled. Default isalways
.features
Collection<Feature> | undefined Features contained in this collection will be able to be translated together.
layers
Array<Layer> | function | undefined 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 iffeatures
is provided.filter
FilterFunction | undefined A function that takes a
Feature
and anLayer
and returnstrue
if the feature may be translated orfalse
otherwise. Not used iffeatures
is provided.hitTolerance
number
(defaults to 0)Hit-detection tolerance. Pixels inside the radius around the given position will be checked for features.