Creates a new edit controller
the layer in which to edit an object
the object to edit
An options object hash containing EditController
options.
An event indicating that this Controller is invalidated. Invalidated means that the Controller requests for its onDraw to be called during the next rendering pass (because its appearance has changed). This event fires when invalidate is called.
The map on which this controller is currently active or null
if this controller is not currently active.
This property is read-only.
The map on which this controller is currently active or null
if this controller is not currently active.
This property is read-only.
Return the maximum number of points that should be allowed during editing.
Return the minimum number of points that should be allowed during editing.
Call this method to indicate that the controller's appearance has changed. Calling this method ensures the onDraw will be called during the next rendering pass.
Called when a key event has been received. This method must return a HandleEventResult value to indicate if the event was handled or not, If this method returns EVENT_IGNORED, the map will be given the opportunity to perform default key event behaviour. If default event handling is not desired, this method should return EVENT_HANDLED. (See the Controller class description for the default behavior.)
The key event to be handled. Note that this is a KeyEvent and not a DOMEvent. You can access the corresponding DOMEvent through KeyEvent.domEvent.
The key event handling result.
Set the minimum and maximum number of points that should allowed during editing using this controller. Once the maximum number of points is reached, the controller will not allow insertion of new points. Once the minimum number of points is reached, the controller will not allow deletion of new points. Note that this method should be called before the edit controller is activated on the map, subsequent calls to this method will be ignored.
The maximum number of points that should be allowed during editing. Set to -1 if not specified.
Controller used to graphically edit existing objects in a layer on the view.
Editing is supported for all shapes available in ShapeFactory. Supported editing operations include moving the entire shape, moving individual vertices or control points, adding vertices, and deleting vertices.
Editing is supported on regular 2D maps as well as WebGL 2D or 3D maps.
However, only 2D shapes or 2D aspects of 3D shapes are editable. For example, you can edit the base shape of an extruded shape.