Module: ol/interaction/Modify

ol/interaction/Modify


Classes

Modify
ModifyEvent

Members

ModifyEventType{string}

Properties:
Name Type Default Description
MODIFYSTART string modifystart
MODIFYEND string modifyend

Type Definitions

Options{Object}

Properties:
Name Type Argument Default Description
condition module:ol/events/condition~Condition <optional>

A function that takes an module:ol/MapBrowserEvent~MapBrowserEvent and returns a boolean to indicate whether that event will be considered to add or move a vertex to the sketch. Default is module:ol/events/condition~primaryAction.

deleteCondition module:ol/events/condition~Condition <optional>

A function that takes an module:ol/MapBrowserEvent~MapBrowserEvent and returns a boolean to indicate whether that event should be handled. By default, module:ol/events/condition~singleClick with module:ol/events/condition~altKeyOnly results in a vertex deletion.

insertVertexCondition module:ol/events/condition~Condition <optional>

A function that takes an module:ol/MapBrowserEvent~MapBrowserEvent and returns a boolean to indicate whether a new vertex can be added to the sketch features. Default is module:ol/events/condition~always.

pixelTolerance number <optional>
10

Pixel tolerance for considering the pointer close enough to a segment or vertex for editing.

style module:ol/style/Style~Style | Array.<module:ol/style/Style~Style> | module:ol/style/Style~StyleFunction <optional>

Style used for the features being modified. By default the default edit style is used (see module:ol/style).

source module:ol/source/Vector~VectorSource <optional>

The vector source with features to modify. If a vector source is not provided, a feature collection must be provided with the features option.

features module:ol/Collection~Collection.<module:ol/Feature~Feature> <optional>

The features the interaction works on. If a feature collection is not provided, a vector source must be provided with the source option.

wrapX boolean <optional>
false

Wrap the world horizontally on the sketch overlay.

SegmentData{Object}

Properties:
Name Type Argument Description
depth Array.<number> <optional>
feature module:ol/Feature~Feature
geometry module:ol/geom/SimpleGeometry~SimpleGeometry
index number
segment Array.<module:ol/extent~Extent>
featureSegments Array.<module:ol/interaction/Modify~SegmentData> <optional>