| Package | com.esri.ags.tools |
| Class | public class EditTool |
| Inheritance | EditTool com.esri.ags.tools.BaseTool |
The property map has to be set for the activate method to complete.
Mouse behavior when editing features
Snapping (as of version 2.3)
See also
| Property | Defined By | ||
|---|---|---|---|
| allowAddVertices : Boolean
Specifies whether users can add new vertices (polyline/polygon). | EditTool | ||
| allowDeleteVertices : Boolean
Specifies whether users can delete vertices (polyline/polygon/multipoint). | EditTool | ||
| ghostVertexSymbol : Symbol
Symbol for "ghost" vertices (polyline/polygon). | EditTool | ||
| map : Map [override]
The Map that the EditTool is associated with. | EditTool | ||
| snapDistance : Number
The distance in pixels for snapping. | EditTool | ||
| snapMode : String
Specifies whether snapping is off, always on or enabled by pressing the Ctrl key. | EditTool | ||
| vertexSymbol : Symbol
Symbol for vertices (polyline/polygon). | EditTool | ||
| Method | Defined By | ||
|---|---|---|---|
Creates a new EditTool object. | EditTool | ||
activate(editType:Number, graphics:Array):void
Activates the tool for editing features. | EditTool | ||
deactivate():void
Deactivates the tool and reactivates map navigation. | EditTool | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| The contextMenuSelect event is dispatched when a context menu is generated but before the contents of the context menu are displayed. | EditTool | |||
| The geometry update event. | EditTool | |||
| The ghost vertex mouse down event. | EditTool | |||
| The graphic rotate event. | EditTool | |||
| The graphic rotate first event. | EditTool | |||
| The graphic rotate start event. | EditTool | |||
| The graphic rotate stop event. | EditTool | |||
| The graphic scale event. | EditTool | |||
| The graphic scale first event. | EditTool | |||
| The graphic scale start event. | EditTool | |||
| The graphic scale stop event. | EditTool | |||
| The graphics move event. | EditTool | |||
| The graphics move first event. | EditTool | |||
| The graphics move start event. | EditTool | |||
| The graphics move stop event. | EditTool | |||
| The vertex add event. | EditTool | |||
| The vertex delete event. | EditTool | |||
| The vertex mouse out event. | EditTool | |||
| The vertex mouse over event. | EditTool | |||
| The vertex move event. | EditTool | |||
| The vertex move first event. | EditTool | |||
| The vertex move start event. | EditTool | |||
| The vertex move stop event. | EditTool | |||
| Constant | Defined By | ||
|---|---|---|---|
| EDIT_VERTICES : Number = 2 [static]
Edit the vertices of the selected graphic (multipoint, polyline and polygon). | EditTool | ||
| MOVE : Number = 1 [static]
Move the array of graphic. | EditTool | ||
| ROTATE : Number = 8 [static]
Rotate the selected graphic (polyline,polygon and extent). | EditTool | ||
| SCALE : Number = 4 [static]
Scale the selected graphic (polyline,polygon and extent). | EditTool | ||
| SNAP_MODE_ALWAYS_ON : String = alwaysOn [static]
Snapping is always on. | EditTool | ||
| SNAP_MODE_OFF : String = off [static]
Snapping is off. | EditTool | ||
| SNAP_MODE_ON_DEMAND : String = onDemand [static]
Enable snapping by pressing the Ctrl key. | EditTool | ||
| allowAddVertices | property |
allowAddVertices:BooleanSpecifies whether users can add new vertices (polyline/polygon). If true, ghost vertices will display for polylines and polygons. If false, no ghost vertices will display.
The default value is true.
This property can be used as the source for data binding.
public function get allowAddVertices():Boolean public function set allowAddVertices(value:Boolean):void| allowDeleteVertices | property |
allowDeleteVertices:BooleanSpecifies whether users can delete vertices (polyline/polygon/multipoint). If true, users can right-click on the vertex to delete a vertex. Only available if the polyline has more than two, or the polygon more than four, vertices.
The default value is true.
This property can be used as the source for data binding.
public function get allowDeleteVertices():Boolean public function set allowDeleteVertices(value:Boolean):void| ghostVertexSymbol | property |
ghostVertexSymbol:SymbolSymbol for "ghost" vertices (polyline/polygon).
This property can be used as the source for data binding.
public function get ghostVertexSymbol():Symbol public function set ghostVertexSymbol(value:Symbol):void| map | property |
map:Map[override] The Map that the EditTool is associated with.
public function get map():Map public function set map(value:Map):void| snapDistance | property |
snapDistance:Number| Since : | ArcGIS API for Flex 2.3 |
The distance in pixels for snapping. To disable snapping, set this value to 0.
The default value is 15.
This property can be used as the source for data binding.
public function get snapDistance():Number public function set snapDistance(value:Number):void| snapMode | property |
snapMode:String| Since : | ArcGIS API for Flex 2.5 |
Specifies whether snapping is off, always on or enabled by pressing the Ctrl key.
The default value is SNAP_MODE_ON_DEMAND.
This property can be used as the source for data binding.
public function get snapMode():String public function set snapMode(value:String):void| vertexSymbol | property |
vertexSymbol:SymbolSymbol for vertices (polyline/polygon).
This property can be used as the source for data binding.
public function get vertexSymbol():Symbol public function set vertexSymbol(value:Symbol):void| EditTool | () | Constructor |
public function EditTool(map:Map = null)Creates a new EditTool object.
Parametersmap:Map (default = null) — The Map that the tool should be associated with.
|
| activate | () | method |
public function activate(editType:Number, graphics:Array):voidActivates the tool for editing features. Once called the tool is ready to respond to user interaction based on specified edit type.
Parameters
editType:Number — The edit type.
It can have one of the following values:
| |
graphics:Array — The array of graphic(feature) to be edited.
|
| deactivate | () | method |
public function deactivate():voidDeactivates the tool and reactivates map navigation.
| contextMenuSelect | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.CONTEXT_MENU_SELECTThe contextMenuSelect event is dispatched when a context menu is generated but before the contents of the context menu are displayed.
Defines the value of thetype property of a contextMenuSelect event object.
| geometryUpdate | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.GEOMETRY_UPDATEThe geometry update event.
Defines the value of thetype property of a geometryUpdate event object.
| ghostVertexMouseDown | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.GHOST_VERTEX_MOUSE_DOWNThe ghost vertex mouse down event.
Defines the value of thetype property of a ghostVertexMouseDown event object.
| graphicRotate | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.GRAPHIC_ROTATEThe graphic rotate event.
Defines the value of thetype property of a graphicRotate event object.
| graphicRotateFirst | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.GRAPHIC_ROTATE_FIRSTThe graphic rotate first event.
Defines the value of thetype property of a graphicRotateFirst event object.
| graphicRotateStart | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.GRAPHIC_ROTATE_STARTThe graphic rotate start event.
Defines the value of thetype property of a graphicRotateStart event object.
| graphicRotateStop | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.GRAPHIC_ROTATE_STOPThe graphic rotate stop event.
Defines the value of thetype property of a graphicRotateStop event object.
| graphicScale | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.GRAPHIC_SCALEThe graphic scale event.
Defines the value of thetype property of a graphicScale event object.
| graphicScaleFirst | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.GRAPHIC_SCALE_FIRSTThe graphic scale first event.
Defines the value of thetype property of a graphicScaleFirst event object.
| graphicScaleStart | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.GRAPHIC_SCALE_STARTThe graphic scale start event.
Defines the value of thetype property of a graphicScaleStart event object.
| graphicScaleStop | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.GRAPHIC_SCALE_STOPThe graphic scale stop event.
Defines the value of thetype property of a graphicScaleStop event object.
| graphicsMove | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.GRAPHICS_MOVEThe graphics move event.
Defines the value of thetype property of a graphicsMove event object.
| graphicsMoveFirst | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.GRAPHICS_MOVE_FIRSTThe graphics move first event.
Defines the value of thetype property of a graphicsMoveFirst event object.
| graphicsMoveStart | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.GRAPHICS_MOVE_STARTThe graphics move start event.
Defines the value of thetype property of a graphicsMoveStart event object.
| graphicsMoveStop | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.GRAPHICS_MOVE_STOPThe graphics move stop event.
Defines the value of thetype property of a graphicsMoveStop event object.
| vertexAdd | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.VERTEX_ADDThe vertex add event.
Defines the value of thetype property of a vertexAdd event object.
| vertexDelete | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.VERTEX_DELETEThe vertex delete event.
Defines the value of thetype property of a vertexDelete event object.
| vertexMouseOut | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.VERTEX_MOUSE_OUTThe vertex mouse out event.
Defines the value of thetype property of a vertexMouseOut event object.
| vertexMouseOver | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.VERTEX_MOUSE_OVERThe vertex mouse over event.
Defines the value of thetype property of a vertexMouseOver event object.
| vertexMove | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.VERTEX_MOVEThe vertex move event.
Defines the value of thetype property of a vertexMove event object.
| vertexMoveFirst | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.VERTEX_NOVE_FIRSTThe vertex move first event.
| vertexMoveStart | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.VERTEX_MOVE_STARTThe vertex move start event.
Defines the value of thetype property of a vertexMoveStart event object.
| vertexMoveStop | Event |
com.esri.ags.events.EditEventcom.esri.ags.events.EditEvent.VERTEX_MOVE_STOPThe vertex move stop event.
Defines the value of thetype property of a vertexMoveStop event object.
| EDIT_VERTICES | Constant |
public static const EDIT_VERTICES:Number = 2Edit the vertices of the selected graphic (multipoint, polyline and polygon).
| MOVE | Constant |
public static const MOVE:Number = 1Move the array of graphic.
| ROTATE | Constant |
public static const ROTATE:Number = 8Rotate the selected graphic (polyline,polygon and extent).
| SCALE | Constant |
public static const SCALE:Number = 4Scale the selected graphic (polyline,polygon and extent).
| SNAP_MODE_ALWAYS_ON | Constant |
public static const SNAP_MODE_ALWAYS_ON:String = alwaysOnSnapping is always on.
| SNAP_MODE_OFF | Constant |
public static const SNAP_MODE_OFF:String = offSnapping is off.
| SNAP_MODE_ON_DEMAND | Constant |
public static const SNAP_MODE_ON_DEMAND:String = onDemandEnable snapping by pressing the Ctrl key.