Class: Modify

ngeo.interaction.Modify

new Modify(options)

This interaction combines multiple kind of feature modification interactions in order to be able to modify vector features depending on their geometry type. The different kind of interactions supported are:

  • ol.interaction.Modify
  • ngeo.interaction.ModifyCircle
  • ngeo.interaction.ModifyRectangle

This interaction receives a collection of features. Its job is to listen to added/removed features to and from it and add them in the proper collection that is uniquely used for each inner interaction. Those inner interactions follow the active property of this interaction, i.e. when this interaction is activated, so do the inner interactions. Since they will never share the same feature, they don't collide with one an other.

Parameters:
Name Type Description
options olx.interaction.ModifyOptions

Options.

Extends

  • ol.interaction.Interaction

Methods

setActive(active)

Activate or deactivate the interaction.

Parameters:
Name Type Description
active boolean

Active.

setMap(map)

Remove the interaction from its current map and attach it to the new map. Subclasses may set up event handlers to get notified about changes to the map here.

Parameters:
Name Type Description
map ol.PluggableMap

Map.